Fix memcached read overflow
This commit is contained in:
@@ -105,7 +105,7 @@ void ndpi_search_memcached(
|
|||||||
{
|
{
|
||||||
struct ndpi_packet_struct *packet = &flow->packet;
|
struct ndpi_packet_struct *packet = &flow->packet;
|
||||||
const u_int8_t *offset = packet->payload;
|
const u_int8_t *offset = packet->payload;
|
||||||
const u_int16_t length = packet->payload_packet_len;
|
u_int16_t length = packet->payload_packet_len;
|
||||||
u_int8_t *matches;
|
u_int8_t *matches;
|
||||||
|
|
||||||
NDPI_LOG_DBG(ndpi_struct, "search memcached\n");
|
NDPI_LOG_DBG(ndpi_struct, "search memcached\n");
|
||||||
@@ -131,6 +131,7 @@ void ndpi_search_memcached(
|
|||||||
}
|
}
|
||||||
|
|
||||||
offset += MEMCACHED_UDP_HDR_LEN;
|
offset += MEMCACHED_UDP_HDR_LEN;
|
||||||
|
length -= MEMCACHED_UDP_HDR_LEN;
|
||||||
matches = &flow->l4.udp.memcached_matches;
|
matches = &flow->l4.udp.memcached_matches;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user