]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/log.c
Import CUPS v1.7.1
[thirdparty/cups.git] / scheduler / log.c
index 0d49357364b91c74374256bd64eac30d90538007..207cd5f1081ecca4d27123be7ae48988c09534c1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id$"
+ * "$Id: log.c 11367 2013-10-28 15:35:57Z msweet $"
  *
  *   Log file routines for the CUPS scheduler.
  *
@@ -496,12 +496,13 @@ cupsdLogJob(cupsd_job_t *job,             /* I - Job */
       */
 
       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)
@@ -1103,5 +1104,5 @@ format_log_line(const char *message,      /* I - Printf-style format string */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: log.c 11367 2013-10-28 15:35:57Z msweet $".
  */