]> 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)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Thu, 14 Dec 2023 18:48:45 +0000 (18:48 +0000)
commita1ca0268254374b515fa5992f01340f7717113fa
treed27d3805e3814129709f992b12fcdb2963cfb2d6
parent39760d109be6f5348b362174e921ac7c521ab980
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