Module: kamailio
Branch: master
Commit: 7231be0785009cb17581822f0765985eb7bdb243
URL:
https://github.com/kamailio/kamailio/commit/7231be0785009cb17581822f0765985…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-04-14T12:52:58+02:00
seas: check when walking the list
---
Modified: src/modules/seas/seas_action.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7231be0785009cb17581822f0765985…
Patch:
https://github.com/kamailio/kamailio/commit/7231be0785009cb17581822f0765985…
---
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);