Skip to content

Commit

Permalink
seas: check when walking the list
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 14, 2021
1 parent c30cd3d commit 7231be0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/seas/seas_action.c
Expand Up @@ -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);
Expand Down

0 comments on commit 7231be0

Please sign in to comment.