Guard memset in camessage.c to prevent wild memory overrun if mismatch

between payload and data size.
This commit is contained in:
Michael Abbott authored and Andrew Johnson committed 2010-08-11 17:37:56 -05:00
commit 053ab01db4
1 file changed
+1 -1
+1 -1
View File
@@ -605,7 +605,7 @@ static void read_reply ( void *pArg, struct dbAddr *paddr,
payload_size = data_size;
cas_set_header_count(pClient, item_count);
}
else
else if (payload_size > data_size)
memset(
(char *) pPayload + data_size, 0, payload_size - data_size);
}