]>
Commit | Line | Data |
---|---|---|
c6a236cf JR |
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) |