2013-10-28 16:31:46 +00:00
|
|
|
diff -up cups-1.7.0/scheduler/log.c.jobhistory cups-1.7.0/scheduler/log.c
|
|
|
|
--- cups-1.7.0/scheduler/log.c.jobhistory 2013-10-28 16:30:39.852015304 +0000
|
|
|
|
+++ cups-1.7.0/scheduler/log.c 2013-10-28 16:30:48.502057711 +0000
|
|
|
|
@@ -525,12 +525,13 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo
|
|
|
|
*/
|
|
|
|
|
|
|
|
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)
|
2013-10-24 14:44:10 +00:00
|
|
|
{
|
|
|
|
temp->time = time(NULL);
|
|
|
|
- strlcpy(temp->message, log_line, sizeof(temp->message));
|
2013-10-28 16:31:46 +00:00
|
|
|
+ memcpy(temp->message, log_line, log_len + 1);
|
2013-10-24 14:44:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!job->history)
|