]> 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)
committerBen Ford <bford@digium.com>
Thu, 26 Sep 2024 15:38:27 +0000 (10:38 -0500)
commit4d1ee54cf3927d48805f25fd568b2a05221edf92
tree2c4d2e1d2592956fc1650f8a564762f3dfcb183e
parent0dc0595f69cae602956ee641fc15f40145fda614
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