diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 20:10:10 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 20:10:10 +0000 |
commit | 6df63b3dca1330b4b1a38154c57769c2d09e5dbd (patch) | |
tree | 5172c6d36ac9b731b077ae39a1b9cc0a34f238a0 /apps/app_voicemail.c | |
parent | eb015e768e971e62ff2033817a67c3b6fc9e51f3 (diff) |
Merged revisions 82644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r82644 | russell | 2007-09-17 15:00:32 -0500 (Mon, 17 Sep 2007) | 6 lines
Initialize some memory to fix crashes when leaving voicemail. This problem
was fixed by running Asterisk under valgrind.
(closes issue #10746, reported by arcivanov, patched by me)
*** IMPORTANT NOTE: We need to check to see if this same bug exists elsewhere.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82660 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 9bb3e9f8e..3a99622c3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1958,6 +1958,8 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in #endif gethostname(host, sizeof(host)-1); + memset(&tm, 0, sizeof(tm)); + if (strchr(srcemail, '@')) ast_copy_string(who, srcemail, sizeof(who)); else @@ -2235,7 +2237,10 @@ static int get_date(char *s, int len) { struct ast_tm tm; struct timeval t = ast_tvnow(); + + memset(&tm, 0, sizeof(tm)); ast_localtime(&t, &tm, NULL); + return ast_strftime(s, len, "%a %b %e %r %Z %Y", &tm); } |