/*
- * "$Id$"
+ * "$Id: log.c 11367 2013-10-28 15:35:57Z msweet $"
*
* Log file routines for the CUPS scheduler.
*
*/
cupsd_joblog_t *temp; /* Copy of log message */
+ size_t log_len = strlen(log_line);
+ /* Length of log message */
-
- if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL)
+ if ((temp = malloc(sizeof(cupsd_joblog_t) + log_len)) != NULL)
{
temp->time = time(NULL);
- strlcpy(temp->message, log_line, sizeof(temp->message));
+ memcpy(temp->message, log_line, log_len + 1);
}
if (!job->history)
/*
- * End of "$Id$".
+ * End of "$Id: log.c 11367 2013-10-28 15:35:57Z msweet $".
*/