]> 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:34:46 +0000 (13:34 -0600)
commitaa728adab0c770f5065db282f5f54bb8bc013d19
treeb3f58b95579f6812d5ea4dd3906ed6b7e42aaef1
parent4937772a8d0b412983a81447c22066a9c8699447
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