Module: sip-router Branch: admorten/sca Commit: db581657408218810cac67a6376a96b6fb1c6f94 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db581657408218810cac67a6376a96b6fb1c6f94
Author: Andrew Mortensen <[email protected]> Committer: Andrew Mortensen <[email protected]> Date: Mon Apr 15 17:17:05 2013 -0400 modules/sca: add check for empty AoR in lock_shared_appearance calls. - Sanity checking --- modules/sca/sca_appearance.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/modules/sca/sca_appearance.c b/modules/sca/sca_appearance.c index 5fb180f..dea9ab4 100644 --- a/modules/sca/sca_appearance.c +++ b/modules/sca/sca_appearance.c @@ -780,6 +780,10 @@ sca_uri_lock_shared_appearance( sca_mod *scam, str *aor ) sca_appearance_list *app_list; int slot_idx; + if ( SCA_STR_EMPTY( aor )) { + return( -1 ); + } + slot_idx = sca_hash_table_index_for_key( scam->appearances, aor ); slot = sca_hash_table_slot_for_index( scam->appearances, slot_idx ); @@ -802,6 +806,11 @@ sca_uri_lock_if_shared_appearance( sca_mod *scam, str *aor, int *slot_idx ) assert( slot_idx != NULL ); + if ( SCA_STR_EMPTY( aor )) { + *slot_idx = -1; + return( 0 ); + } + *slot_idx = sca_hash_table_index_for_key( scam->appearances, aor ); slot = sca_hash_table_slot_for_index( scam->appearances, *slot_idx ); _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
