[packages/cups] - fix job history logging (patch from upstream, via fedora)
baggins
baggins at pld-linux.org
Wed Nov 13 19:45:25 CET 2013
commit c6a236cfef3585ec877d7e763f62f729f6dd1f3c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Nov 13 19:40:15 2013 +0100
- fix job history logging (patch from upstream, via fedora)
cups-jobhistory.patch | 20 ++++++++++++++++++++
cups.spec | 2 ++
2 files changed, 22 insertions(+)
---
diff --git a/cups.spec b/cups.spec
index 97b1328..bc63553 100644
--- a/cups.spec
+++ b/cups.spec
@@ -46,6 +46,7 @@ Patch15: reactivate_recommended_driver.patch
Patch16: read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch
Patch17: %{name}-use-ipp1.1.patch
Patch18: %{name}-final-content-type.patch
+Patch19: %{name}-jobhistory.patch
# avahi patches from fedora
Patch100: %{name}-avahi-address.patch
Patch101: %{name}-avahi-no-threaded.patch
@@ -268,6 +269,7 @@ Wsparcie dla LPD w serwerze wydruków CUPS.
%patch16 -p1
%patch17 -p1
%patch18 -p1
+%patch19 -p1
%if %{with avahi}
%patch100 -p1
diff --git a/cups-jobhistory.patch b/cups-jobhistory.patch
new file mode 100644
index 0000000..391120d
--- /dev/null
+++ b/cups-jobhistory.patch
@@ -0,0 +1,20 @@
+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));
++ memcpy(temp->message, log_line, log_len + 1);
+ }
+
+ if (!job->history)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cups.git/commitdiff/2abe5e573fdee29e46937f3ce4353fcc8826e763
More information about the pld-cvs-commit
mailing list