[asterisk-commits] tilghman: branch 1.4 r128856 - /branches/1.4/apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 7 19:01:31 CDT 2008
Author: tilghman
Date: Mon Jul 7 19:01:30 2008
New Revision: 128856
URL: http://svn.digium.com/view/asterisk?view=rev&rev=128856
Log:
Check for non-NULL before stripping characters.
(closes issue #12954)
Reported by: bfsworks
Patches:
20080701__bug12954.diff.txt uploaded by Corydon76 (license 14)
Tested by: deti
Modified:
branches/1.4/apps/app_voicemail.c
Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=128856&r1=128855&r2=128856
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Mon Jul 7 19:01:30 2008
@@ -1847,7 +1847,7 @@
char fname[256];
char dur[256];
char tmpcmd[256];
- char enc_cidnum[256], enc_cidname[256];
+ char enc_cidnum[256] = "", enc_cidname[256] = "";
struct tm tm;
char *passdata2;
size_t len_passdata;
@@ -1857,8 +1857,12 @@
#define ENDL "\n"
#endif
- strip_control(cidnum, enc_cidnum, sizeof(enc_cidnum));
- strip_control(cidname, enc_cidname, sizeof(enc_cidname));
+ if (cidnum) {
+ strip_control(cidnum, enc_cidnum, sizeof(enc_cidnum));
+ }
+ if (cidname) {
+ strip_control(cidname, enc_cidname, sizeof(enc_cidname));
+ }
gethostname(host, sizeof(host) - 1);
if (strchr(srcemail, '@'))
ast_copy_string(who, srcemail, sizeof(who));
More information about the asterisk-commits
mailing list