]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/config_options: Check for existance of internal object before derefing 92/1192/3
authorMatt Jordan <mjordan@digium.com>
Fri, 4 Sep 2015 02:15:13 +0000 (21:15 -0500)
committerMatt Jordan <mjordan@digium.com>
Thu, 10 Sep 2015 00:22:04 +0000 (19:22 -0500)
commit4eedd9ef9d7c000cd8d67cbeb1789ac6d71860aa
tree78fa54301a7b553581c7a27fb4149c8b056e593e
parent777f9adfc7be50b634e0b131af611ac936f9cca8
main/config_options: Check for existance of internal object before derefing

Asterisk can load and register an object type while still having an invalid
sorcery mapping. This can cause an issue when a creation call is invoked.
For example, mis-configuring PJSIP's endpoint identifier by IP address mapping
in sorcery.conf will cause the sorcery mechanism to be invalidated; however, a
subsequent ARI invocation to create the object will cause a crash, as the
internal type may not be registered as sorcery expects.

Merely checking for a NULL pointer here solves the issue.

Change-Id: I54079fb94a1440992f4735a9a1bbf1abb1c601ac
main/config_options.c