]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_header_funcs: wrong pool used tdata headers
authorKevin Harwell <kharwell@sangoma.com>
Wed, 23 Mar 2022 22:45:45 +0000 (17:45 -0500)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 30 Mar 2022 20:13:53 +0000 (15:13 -0500)
commit629ced6db0584fdf18388a79a685f79b9e33f43c
tree11e3a4405c662b82f34959d3091e3d5348b3d8d4
parentc812ad62f799d5691e4b413be8d76120473a2d4a
res_pjsip_header_funcs: wrong pool used tdata headers

When adding headers to an outgoing request the headers were cloned using
the dialog's pool when they should have been cloned using tdata's pool.
Under certain circumstances it was possible for the dialog object, and
its pool to be freed while tdata is still active and available. Thus the
cloned header "disappeared", and when tdata tried to later access it a
crash would occur.

This patch makes it so all added headers are cloned appropriately using
tdata's pool.

ASTERISK-29411 #close
ASTERISK-29535 #close

Change-Id: I9852025b5ee93ce1c038209150ee9dba1e0767c5
res/res_pjsip_header_funcs.c