Fix buffer over read in ndpi_handle_ipv6_extension_headers

This commit is contained in:
Philippe Antoine
2019-10-30 17:18:21 +01:00
parent af01e61c89
commit 4830755fac
+3
View File
@@ -3518,6 +3518,9 @@ static int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struc
}
// the other extension headers have one byte for the next header type
// and one byte for the extension header length in 8 byte steps minus the first 8 bytes
if (*l4len < 2) {
return(1);
}
ehdr_len = (*l4ptr)[1];
ehdr_len *= 8;
ehdr_len += 8;