Skip to content

Commit

Permalink
sipsess/reply: fix heap-use-after-free bug (#1179)
Browse files Browse the repository at this point in the history
* sipsess/reply: fix heap-use-after-free bug

fixes #1178 - `mem_deref(sess)` calls maybe list_flush(&sess->replyl)
within destructor and reply is a dangling pointer after this.

* deref reply before session
  • Loading branch information
sreimers authored Aug 19, 2024
1 parent ee1be80 commit 5b00488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sipsess/reply.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ static void tmr_handler(void *arg)
}
}
else {
mem_deref(reply);
mem_deref(sess);
return;
}

mem_deref(reply);
Expand Down

0 comments on commit 5b00488

Please sign in to comment.