aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 00:02:11 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-08 00:02:11 +0000
commita2082a65fd74d8c6bf59f586ed0a75964bee7dea (patch)
tree1c1eb486236f2f30c9ca01c6585ccc4f80656225 /apps
parent082f0f1fcee141edb2faa9ab365f381950969327 (diff)
Merged revisions 128856 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r128856 | tilghman | 2008-07-07 19:01:30 -0500 (Mon, 07 Jul 2008) | 7 lines 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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@128857 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9b3fa3f13..f25811af6 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2421,7 +2421,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
char bound[256];
char dur[256];
struct ast_tm tm;
- char enc_cidnum[256], enc_cidname[256];
+ char enc_cidnum[256] = "", enc_cidname[256] = "";
char *passdata2;
size_t len_passdata;
char *greeting_attachment;
@@ -2433,8 +2433,12 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
#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, '@'))