Use upstream patch to fix job history.

This commit is contained in:
Tim Waugh 2013-10-28 16:31:46 +00:00
parent c874e6e680
commit 5b52a14441
2 changed files with 18 additions and 7 deletions

View File

@ -1,12 +1,20 @@
diff -up cups-1.7rc1/scheduler/log.c.orig cups-1.7rc1/scheduler/log.c diff -up cups-1.7.0/scheduler/log.c.jobhistory cups-1.7.0/scheduler/log.c
--- cups-1.7rc1/scheduler/log.c.orig 2013-10-24 15:40:42.412062412 +0100 --- cups-1.7.0/scheduler/log.c.jobhistory 2013-10-28 16:30:39.852015304 +0000
+++ cups-1.7rc1/scheduler/log.c 2013-10-24 15:40:43.329066617 +0100 +++ cups-1.7.0/scheduler/log.c 2013-10-28 16:30:48.502057711 +0000
@@ -534,7 +534,7 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo @@ -525,12 +525,13 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo
if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL) */
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); temp->time = time(NULL);
- strlcpy(temp->message, log_line, sizeof(temp->message)); - strlcpy(temp->message, log_line, sizeof(temp->message));
+ strcpy(temp->message, log_line); + memcpy(temp->message, log_line, log_len + 1);
} }
if (!job->history) if (!job->history)

View File

@ -11,7 +11,7 @@ Summary: CUPS printing system
Name: cups Name: cups
Epoch: 1 Epoch: 1
Version: 1.7.0 Version: 1.7.0
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Daemons Group: System Environment/Daemons
Url: http://www.cups.org/ Url: http://www.cups.org/
@ -649,6 +649,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz %{_mandir}/man5/ipptoolfile.5.gz
%changelog %changelog
* Mon Oct 28 2013 Tim Waugh <twaugh@redhat.com> - 1:1.7.0-2
- Use upstream patch to fix job history.
* Thu Oct 24 2013 Tim Waugh <twaugh@redhat.com> - 1:1.7.0-1 * Thu Oct 24 2013 Tim Waugh <twaugh@redhat.com> - 1:1.7.0-1
- 1.7.0. - 1.7.0.