summaryrefslogtreecommitdiff
path: root/print/hpijs/patches/patch-hpijs.cpp
blob: 4a245859a569536ad0d790a08f6f32cb856a3e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-hpijs.cpp,v 1.1 2015/04/26 13:28:23 joerg Exp $

--- hpijs.cpp.orig	2015-04-26 12:31:06.000000000 +0000
+++ hpijs.cpp
@@ -56,8 +56,8 @@ int bug(const char *fmt, ...)
    if ((n = vsnprintf(buf, 256, fmt, args)) == -1)
       buf[255] = 0;     /* output was truncated */
 
-   fprintf(stderr, buf);
-   syslog(LOG_WARNING, buf);
+   fprintf(stderr, "%s", buf);
+   syslog(LOG_WARNING, "%s", buf);
 
    fflush(stderr);
    va_end(args);
@@ -357,7 +357,7 @@ int hpijs_get_cb(void *get_cb_data, IjsS
    }
    else if (!strcmp (key, "ColorSpace"))
    {
-      return snprintf(value_buf, value_size, pSS->ph.cs);
+      return snprintf(value_buf, value_size, "%s", pSS->ph.cs);
    }
    else if (!strcmp (key, "PageImageFormat"))
    {