[asterisk-commits] qwell: trunk r98773 - /trunk/channels/chan_skinny.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 14 11:18:36 CST 2008
Author: qwell
Date: Mon Jan 14 11:18:35 2008
New Revision: 98773
URL: http://svn.digium.com/view/asterisk?view=rev&rev=98773
Log:
Fix for potential crash with vmexten
Modified:
trunk/channels/chan_skinny.c
Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=98773&r1=98772&r2=98773
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon Jan 14 11:18:35 2008
@@ -2770,6 +2770,9 @@
d->prefs = default_prefs;
if (!ast_strlen_zero(vmexten))
ast_copy_string(device_vmexten, vmexten, sizeof(device_vmexten));
+ else
+ memset(device_vmexten, 0, sizeof(device_vmexten));
+
while(v) {
if (!strcasecmp(v->name, "host")) {
if (ast_get_ip(&d->addr, v->value)) {
@@ -2904,8 +2907,7 @@
ast_copy_string(l->mailbox, mailbox, sizeof(l->mailbox));
if (!ast_strlen_zero(mailbox))
ast_verb(3, "Setting mailbox '%s' on %s@%s\n", mailbox, d->name, l->name);
- if (!ast_strlen_zero(device_vmexten))
- ast_copy_string(l->vmexten, device_vmexten, sizeof(vmexten));
+ ast_copy_string(l->vmexten, device_vmexten, sizeof(vmexten));
l->chanvars = chanvars;
l->msgstate = -1;
l->capability = d->capability;
More information about the asterisk-commits
mailing list