]> 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)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Tue, 17 Sep 2024 16:15:30 +0000 (16:15 +0000)
commitedb8eebeff734222ff8062129814d0d3eeb2a03b
tree057920cf07e969dac47007ea7743f0ff0d285a7f
parentdd348e55aa2fdc7b8f1b95bf2666fc8d1c95b0e2
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