]> git.pld-linux.org Git - packages/cups.git/blob - cups-jobhistory.patch
more verbose files, so we can track what belongs to cups and what to cups-filters...
[packages/cups.git] / cups-jobhistory.patch
1 diff -up cups-1.7.0/scheduler/log.c.jobhistory cups-1.7.0/scheduler/log.c
2 --- cups-1.7.0/scheduler/log.c.jobhistory       2013-10-28 16:30:39.852015304 +0000
3 +++ cups-1.7.0/scheduler/log.c  2013-10-28 16:30:48.502057711 +0000
4 @@ -525,12 +525,13 @@ cupsdLogJob(cupsd_job_t *job,             /* I - Jo
5        */
6  
7        cupsd_joblog_t *temp;            /* Copy of log message */
8 +      size_t         log_len = strlen(log_line);
9 +                                       /* Length of log message */
10  
11 -
12 -      if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL)
13 +      if ((temp = malloc(sizeof(cupsd_joblog_t) + log_len)) != NULL)
14        {
15          temp->time = time(NULL);
16 -       strlcpy(temp->message, log_line, sizeof(temp->message));
17 +       memcpy(temp->message, log_line, log_len + 1);
18        }
19  
20        if (!job->history)
This page took 0.034423 seconds and 3 git commands to generate.