mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-18 17:35:04 -07:00
Fix crash in app_voicemail related to message counting.
We were passing a 'struct inprocess **' and treating it like a 'struct inprocess *' causing a segfault. (closes issue #16921) Reported by: whardier Patches: 20100301_issue16921.patch uploaded by seanbright (license 71) Tested by: whardier git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@249671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -439,7 +439,7 @@ static int inprocess_count(const char *context, const char *mailbox, int delta)
|
||||
strcpy(arg->mailbox, mailbox); /* SAFE */
|
||||
strcpy(arg->context, context); /* SAFE */
|
||||
ao2_lock(inprocess_container);
|
||||
if ((i = ao2_find(inprocess_container, &arg, 0))) {
|
||||
if ((i = ao2_find(inprocess_container, arg, 0))) {
|
||||
int ret = ast_atomic_fetchadd_int(&i->count, delta);
|
||||
ao2_unlock(inprocess_container);
|
||||
ao2_ref(i, -1);
|
||||
|
||||
Reference in New Issue
Block a user