Module: kamailio Branch: 5.4 Commit: 98b091d16072bc767affde805c30c7ec4911b9ec URL: https://github.com/kamailio/kamailio/commit/98b091d16072bc767affde805c30c7ec4911b9ec
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2021-04-15T08:35:23+02:00 seas: check when walking the list (cherry picked from commit 7231be0785009cb17581822f0765985eb7bdb243) --- Modified: src/modules/seas/seas_action.c --- Diff: https://github.com/kamailio/kamailio/commit/98b091d16072bc767affde805c30c7ec4911b9ec.diff Patch: https://github.com/kamailio/kamailio/commit/98b091d16072bc767affde805c30c7ec4911b9ec.patch --- diff --git a/src/modules/seas/seas_action.c b/src/modules/seas/seas_action.c index cd62848ab0..83be6307d0 100644 --- a/src/modules/seas/seas_action.c +++ b/src/modules/seas/seas_action.c @@ -1329,8 +1329,12 @@ int extract_allowed_headers(struct sip_msg *my_msg,int strip_top_vias,int allow_ }else{ assert(rtcnt>0); rb=hf->parsed; - while(--rtcnt) + while(rb && --rtcnt) rb=rb->next; + if(!rb) { + LM_ERR("no rr\n"); + goto error; + } k= (((rb->nameaddr.name.s) + rb->len)-hf->name.s) ; if(len+k+CRLF_LEN<headers_len){ memcpy(headers+len,hf->name.s,k); _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
