]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_strings: HASHKEY - negative array index can cause corruption
authorKevin Harwell <kharwell@digium.com>
Fri, 16 Nov 2018 20:45:23 +0000 (14:45 -0600)
committerKevin Harwell <kharwell@digium.com>
Mon, 19 Nov 2018 19:41:52 +0000 (14:41 -0500)
commit72e532136c6e8092bb2a76a93b243634f5902a13
tree1a806bf74d1a691d0311d0bca37c87a18aef458c
parent3506f84a37fdf23ba8b75d6c87f5e937f5f59fe9
func_strings: HASHKEY - negative array index can cause corruption

This patch makes it so only matching non-empty key names, and keys created by
the HASH function are eligible for inclusion in the comma separated string. It
also fixes a bug where it was possible to write to a negative index if the
result buffer was empty.

ASTERISK-28159
patches:
  ASTERISK-28159.diff submitted by Michael Walton (license 6502)

Change-Id: I6e57fe7307dfd856271753aed5ba64c59b511487
funcs/func_strings.c