]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 13 Sep 2024 14:23:08 +0000 (08:23 -0600)
committerGeorge Joseph <gjoseph@sangoma.com>
Tue, 17 Sep 2024 16:15:25 +0000 (16:15 +0000)
commit51ec74718e84e5caa06267970c9b0394746b27ea
tree8ae1f9fe445b1335bd4dbfec46031be110d47e82
parentef7d177ee3566e249ecd848fb9793a0b74da5e0b
res_stir_shaken.c: Fix crash when stir_shaken.conf is invalid

* If the call to ast_config_load() returns CONFIG_STATUS_FILEINVALID,
check_for_old_config() now returns LOAD_DECLINE instead of continuing
on with a bad pointer.

* If CONFIG_STATUS_FILEMISSING is returned, check_for_old_config()
assumes the config is being loaded from realtime and now returns
LOAD_SUCCESS.  If it's actually not being loaded from realtime,
sorcery will catch that later on.

* Also refactored the error handling in load_module() a bit.

Resolves: #884
res/res_stir_shaken.c