diff --git a/AUTHORS b/AUTHORS index 6b809b8..0a763ae 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,3 +3,4 @@ Pål-Erik Martinsen Vladislav Volkov +Marcel De Kogel diff --git a/src/stunlib.c b/src/stunlib.c index cb37997..1cd6288 100644 --- a/src/stunlib.c +++ b/src/stunlib.c @@ -2553,6 +2553,10 @@ stunlib_checkIntegrity(const uint8_t* buf, msgIntLength = msgIntLength - 8; } + if (bufLen > STUN_MAX_PACKET_SIZE) + { + return false; + } memcpy(&bufCopy, buf, bufLen); /*Write new packet length in header*/