to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82676
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#define ENDL "\n"
#endif
- memset(&tm, 0, sizeof(tm));
-
gethostname(host, sizeof(host) - 1);
if (strchr(srcemail, '@'))
ast_copy_string(who, srcemail, sizeof(who));
time_t t;
time(&t);
- memset(&tm, 0, sizeof(tm));
ast_localtime(&t, &tm, NULL);
struct tm *ast_localtime(const time_t *timep, struct 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;
}