Module: kamailio Branch: 5.5 Commit: ccd29983f538d13de3f5d07584d45020ca75f174 URL: https://github.com/kamailio/kamailio/commit/ccd29983f538d13de3f5d07584d45020...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-06-15T10:00:09+02:00
nathelper: check length on new condition inside replace_sdp_ip()
(cherry picked from commit 521485c8f25f55cb3045ab2b33232c7026d8527d)
---
Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/ccd29983f538d13de3f5d07584d45020... Patch: https://github.com/kamailio/kamailio/commit/ccd29983f538d13de3f5d07584d45020...
---
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 9512834d0e..1392a0af2a 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -1655,7 +1655,7 @@ static inline int replace_sdp_ip( hasreplaced = 1; body1 = body2; } - if(!hasreplaced && memcmp("a=rtcp", line, 6) != 0) { + if(!hasreplaced && linelen>=6 && memcmp("a=rtcp", line, 6)!=0) { LM_ERR("can't extract '%s' IP from the SDP\n", line); return -1; }