]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix unsafe uses of ast_context pointers. 81/481/3
authorCorey Farrell <git@cfware.com>
Sun, 17 May 2015 04:04:16 +0000 (00:04 -0400)
committerCorey Farrell <git@cfware.com>
Mon, 8 Jun 2015 15:23:38 +0000 (11:23 -0400)
commit53658a14cca8d7c17e5c1525eea21fc478584ba3
tree4513b810e423de0929bba3b4bb3a74cce5ba7381
parenteed9b1ce5210ad08ef5e0b5f20c4f9d7055cb569
Fix unsafe uses of ast_context pointers.

Although ast_context_find, ast_context_find_or_create and
ast_context_destroy perform locking of the contexts table,
any context pointer can become invalid at any time that the
contexts table is unlocked. This change adds locking around
all complete operations involving these functions.

Places where ast_context_find was followed by ast_context_destroy
have been replaced with calls ast_context_destroy_by_name.

ASTERISK-25094 #close
Reported by: Corey Farrell

Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
apps/app_meetme.c
channels/chan_iax2.c
channels/chan_sip.c
channels/chan_skinny.c
include/asterisk/pbx.h
main/features.c
main/pbx.c
pbx/pbx_config.c
tests/test_gosub.c
tests/test_pbx.c