diff --git a/cups-jobhistory.patch b/cups-jobhistory.patch index 4fc6694..391120d 100644 --- a/cups-jobhistory.patch +++ b/cups-jobhistory.patch @@ -1,12 +1,20 @@ -diff -up cups-1.7rc1/scheduler/log.c.orig cups-1.7rc1/scheduler/log.c ---- cups-1.7rc1/scheduler/log.c.orig 2013-10-24 15:40:42.412062412 +0100 -+++ cups-1.7rc1/scheduler/log.c 2013-10-24 15:40:43.329066617 +0100 -@@ -534,7 +534,7 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo - if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL) +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) { temp->time = time(NULL); - strlcpy(temp->message, log_line, sizeof(temp->message)); -+ strcpy(temp->message, log_line); ++ memcpy(temp->message, log_line, log_len + 1); } if (!job->history) diff --git a/cups.spec b/cups.spec index 2a208bf..0cecbff 100644 --- a/cups.spec +++ b/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.7.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -649,6 +649,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Mon Oct 28 2013 Tim Waugh - 1:1.7.0-2 +- Use upstream patch to fix job history. + * Thu Oct 24 2013 Tim Waugh - 1:1.7.0-1 - 1.7.0.