]> 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:34:07 +0000 (18:34 +0000)
commitecb3c3d8e5ec6d32326bd44899af2397a7c630a2
tree0aedb989f249e894667e2bca26f6f28156643185
parent7863ff70bd8d0c9cc6f337763670e2038d515a79
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 6574f6532d964ca6f31ff04b0a6d0f3b7aa7f215)
funcs/func_strings.c