[asterisk-commits] russell: trunk r82678 - in /trunk: ./ apps/ main/stdtime/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 17 15:19:59 CDT 2007


Author: russell
Date: Mon Sep 17 15:19:58 2007
New Revision: 82678

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82678
Log:
Merged revisions 82676 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82676 | russell | 2007-09-17 15:16:25 -0500 (Mon, 17 Sep 2007) | 4 lines

Put a memset in ast_localtime() instead of a couple places in app_voicemail
to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c
    trunk/main/stdtime/localtime.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=82678&r1=82677&r2=82678
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Sep 17 15:19:58 2007
@@ -1958,7 +1958,6 @@
 #endif
 
 	gethostname(host, sizeof(host)-1);
-	memset(&tm, 0, sizeof(tm));
 
 	if (strchr(srcemail, '@'))
 		ast_copy_string(who, srcemail, sizeof(who));
@@ -2238,7 +2237,6 @@
 	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);

Modified: trunk/main/stdtime/localtime.c
URL: http://svn.digium.com/view/asterisk/trunk/main/stdtime/localtime.c?view=diff&rev=82678&r1=82677&r2=82678
==============================================================================
--- trunk/main/stdtime/localtime.c (original)
+++ trunk/main/stdtime/localtime.c Mon Sep 17 15:19:58 2007
@@ -1141,6 +1141,7 @@
 struct ast_tm *ast_localtime(const struct timeval *timep, struct ast_tm *tmp, const char *zone)
 {
 	const struct state *sp = ast_tzset(zone);
+	memset(tmp, 0, sizeof(*tmp));
 	return sp ? localsub(timep, 0L, tmp, sp) : NULL;
 }
 




More information about the asterisk-commits mailing list