]> 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 16:03:54 +0000 (11:03 -0500)
commitf32fd478e2fe30b94e7a914334c4bfca415ef957
tree47946db6f6cd3d431bcff61c1cd7dcfb186e260d
parent19220afe89420d2ece70c2a8bc0699591e16600d
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