-const char parsers_rcs[] = "$Id: parsers.c,v 1.181 2009/06/17 14:51:23 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.183 2009/06/17 18:23:06 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
#else
timeptr = gmtime(&last_modified);
#endif
- if (!strftime(newheader, sizeof(newheader),
- "%a, %d %b %Y %H:%M:%S GMT", timeptr))
+ if ((NULL == timeptr) || !strftime(newheader,
+ sizeof(newheader), "%a, %d %b %Y %H:%M:%S GMT", timeptr))
{
log_error(LOG_LEVEL_ERROR,
- "Randomizing '%s' failed. Keeping the header unmodified.",
+ "Randomizing '%s' failed. Crunching the header without replacement.",
*header);
+ freez(*header);
return JB_ERR_OK;
}
#else
timeptr = gmtime(&tm);
#endif
- if (!strftime(newheader, sizeof(newheader),
- "%a, %d %b %Y %H:%M:%S GMT", timeptr))
+ if ((NULL == timeptr) || !strftime(newheader,
+ sizeof(newheader), "%a, %d %b %Y %H:%M:%S GMT", timeptr))
{
log_error(LOG_LEVEL_ERROR,
- "Randomizing '%s' failed. Keeping the header unmodified.",
+ "Randomizing '%s' failed. Crunching the header without replacement.",
*header);
+ freez(*header);
return JB_ERR_OK;
}