]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx.c: Crash in handle_hint_change due to uninitialized values 01/3601/2
authorKevin Harwell <kharwell@digium.com>
Wed, 17 Aug 2016 21:40:49 +0000 (16:40 -0500)
committerKevin Harwell <kharwell@digium.com>
Wed, 17 Aug 2016 22:56:46 +0000 (17:56 -0500)
commit7b4db45cb7aaa9c9569d8e7e7804ee28a805b8f4
tree1427c6ad23d3da2c25e17acd2117a20cd540d5db
parent3e0eafa710f792a47426f21eeb46a8296224ce49
pbx.c: Crash in handle_hint_change due to uninitialized values

handle_hint_change calls extension_presence_state_helper, which returns the
presence state subtype and message when a valid state is available. If the
state is invalid then those values are not filled. If they have not been
properly initialized to NULL then when ast_free is later called on them
Asterisk crashes.

This patch initializes the subtype and message to NULL.

ASTERISK-25706 #close
patches:
  0008-handle_hint_change-initialize-presence_state.patch
   submitted by Tzafrir Cohen (license 5035)

Change-Id: I2eb08c68951b327c42df0798de60484c3a225a50
main/pbx.c