Fixed more buffer overflows with small packets

This commit is contained in:
theirix
2016-04-12 22:14:13 +03:00
parent fb3fc0c6de
commit c22d3d3cae
8 changed files with 60 additions and 57 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ static void ndpi_check_spotify(struct ndpi_detection_module_struct *ndpi_struct,
}
} else if(packet->tcp != NULL) {
if(packet->payload[0] == 0x00 && packet->payload[1] == 0x04 &&
if(payload_len >= 8 && packet->payload[0] == 0x00 && packet->payload[1] == 0x04 &&
packet->payload[2] == 0x00 && packet->payload[3] == 0x00&&
packet->payload[6] == 0x52 && packet->payload[7] == 0x0e &&
packet->payload[8] == 0x50 ) {