]> 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:21 +0000 (16:15 +0000)
commitf0994e1e62dbba07849e8bbeffa5f27b5493a805
treeac03484f8eeea0ce8eb02e7bfdf586cf9a085932
parentd010dd9752247fe9a60829a29ee9a436bd10d0fd
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