Merge pull request #824 from catenacyber/stunfix

Fix read buffer overflow in stun
This commit is contained in:
Luca Deri
2019-12-18 19:29:23 +01:00
committed by GitHub
+1 -1
View File
@@ -314,7 +314,7 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct *
https://en.wikipedia.org/wiki/Skype_for_Business
*/
while((offset+2) < payload_length) {
while((offset+4) < payload_length) {
u_int16_t attribute = ntohs(*((u_int16_t*)&payload[offset]));
u_int16_t len = ntohs(*((u_int16_t*)&payload[offset+2]));
u_int16_t x = (len + 4) % 4;