Skip to content

Commit

Permalink
nathelper: Do not crash on bad ping reply
Browse files Browse the repository at this point in the history
Credits to Alexey Vasilyev for the report!
Fixes #2242

(cherry picked from commit fb34cbc)
  • Loading branch information
liviuchircu committed Sep 7, 2020
1 parent d29d45f commit e74829d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/nathelper/sip_pinger.h
Expand Up @@ -215,7 +215,8 @@ static int sipping_rpl_filter(struct sip_msg *rpl)
/* it's a reply to a SIP NAT ping -> absorb it and stop any
* further processing of it */
if (!ignore_reply(rpl) && match_ctid &&
parse_branch(rpl->via1->branch->value))
(rpl->via1 && rpl->via1->branch &&
parse_branch(rpl->via1->branch->value)))
goto skip;

return 0;
Expand Down

0 comments on commit e74829d

Please sign in to comment.