Module: sip-router Branch: master Commit: ddfbbd7c0eb7fc1c7ffbb07d6260271ded8b42b3 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ddfbbd7c...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Mon Dec 31 18:18:05 2012 +0200
parser/sdp: added check on body length when looking for 'a=candidate:'
---
parser/sdp/sdp_helpr_funcs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/parser/sdp/sdp_helpr_funcs.c b/parser/sdp/sdp_helpr_funcs.c index 0b04530..a9eb315 100644 --- a/parser/sdp/sdp_helpr_funcs.c +++ b/parser/sdp/sdp_helpr_funcs.c @@ -343,7 +343,7 @@ int extract_candidate(str *body, sdp_stream_cell_t *stream) int len, fl; sdp_ice_attr_t *ice_attr;
- if (strncasecmp(body->s, "a=candidate:", 12) != 0) { + if ((body->len < 12) || (strncasecmp(body->s, "a=candidate:", 12) != 0)) { /*LM_DBG("We are not pointing to an a=candidate: attribute =>`%.*s'\n", body->len, body->s); */ return -1; }