]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_header_funcs: Duplicate new header value, don't copy.
authorGitea <gitea@fake.local>
Mon, 10 Jul 2023 15:43:06 +0000 (12:43 -0300)
committerMike Bradeen <mbradeen@sangoma.com>
Thu, 14 Dec 2023 18:56:26 +0000 (11:56 -0700)
commit31e8a39504667906189120e0516d5829244b2184
tree1ce30cd3ccf0c8e27477637f18c3c25754594caa
parent3e9561913596f6bc0015def07cfc5d91643feced
res_pjsip_header_funcs: Duplicate new header value, don't copy.

When updating an existing header the 'update' code incorrectly
just copied the new value into the existing buffer. If the
new value exceeded the available buffer size memory outside
of the buffer would be written into, potentially causing
a crash.

This change makes it so that the 'update' now duplicates
the new header value instead of copying it into the existing
buffer.
res/res_pjsip_header_funcs.c