[asterisk-commits] kmoore: branch 1.8 r345063 - /branches/1.8/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 14 09:08:17 CST 2011
Author: kmoore
Date: Mon Nov 14 09:08:12 2011
New Revision: 345063
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=345063
Log:
Ensure that a null vmexten does not cause a segfault
When sip_send_mwi_to_peer was modified recently to avoid deadlocks, vmexten
was not expected to be null. This change handles that situation to avoid
a segfault.
Modified:
branches/1.8/channels/chan_sip.c
Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=345063&r1=345062&r2=345063
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Mon Nov 14 09:08:12 2011
@@ -25280,11 +25280,13 @@
/* Called with peerl lock, but releases it */
struct sip_pvt *p;
int newmsgs = 0, oldmsgs = 0;
- const char *vmexten;
+ const char *vmexten = NULL;
ao2_lock(peer);
- vmexten = ast_strdupa(peer->vmexten);
+ if (peer->vmexten) {
+ vmexten = ast_strdupa(peer->vmexten);
+ }
if (ast_test_flag((&peer->flags[1]), SIP_PAGE2_SUBSCRIBEMWIONLY) && !peer->mwipvt) {
ao2_unlock(peer);
More information about the asterisk-commits
mailing list