]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_strings.c: Prevent SEGV in HASH single-argument mode.
authorGeorge Joseph <gjoseph@sangoma.com>
Thu, 30 Jan 2025 15:49:33 +0000 (08:49 -0700)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 20 Mar 2025 18:29:21 +0000 (18:29 +0000)
commit066dc7b18efc55abaf3ec0ca9150c1cfd85ec949
tree6584c25f56426a4a77b9f4cfd10741858e03378e
parent16480d6e7356e8f406ab02b08e58acca66253418
func_strings.c: Prevent SEGV in HASH single-argument mode.

When in single-argument mode (very rarely used), a malformation of a column
name (also very rare) could cause a NULL to be returned when retrieving the
channel variable for that column.  Passing that to strncat causes a SEGV.  We
now check for the NULL and print a warning message.

Resolves: #1101
(cherry picked from commit f5e066a48b8dade79dab87bb8e2940a818ec1894)
funcs/func_strings.c