]> 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)
committerdon't copy. <Gitea|gitea@fake.local|>
Thu, 14 Dec 2023 18:48:38 +0000 (18:48 +0000)
commit510f7798d8564b716566f569185aa3daadd73ca4
tree436373cec5bb8c1e7e53af0d508b410335ee871a
parent6bc81d0c8604e8e36bb4810e2d1da892d15a9bfe
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