summaryrefslogtreecommitdiff
path: root/print/ghostscript/patches/patch-ak
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript/patches/patch-ak')
-rw-r--r--print/ghostscript/patches/patch-ak31
1 files changed, 31 insertions, 0 deletions
diff --git a/print/ghostscript/patches/patch-ak b/print/ghostscript/patches/patch-ak
new file mode 100644
index 00000000000..2ee9568cf4b
--- /dev/null
+++ b/print/ghostscript/patches/patch-ak
@@ -0,0 +1,31 @@
+$NetBSD: patch-ak,v 1.3 2009/12/23 13:27:59 drochner Exp $
+
+--- base/gsmisc.c.orig 2009-12-23 12:29:51.000000000 +0000
++++ base/gsmisc.c
+@@ -69,7 +69,7 @@ int outprintf(const gs_memory_t *mem, co
+
+ va_start(args, fmt);
+
+- count = vsprintf(buf, fmt, args);
++ count = vsnprintf(buf, sizeof(buf), fmt, args);
+ outwrite(mem, buf, count);
+ if (count >= PRINTF_BUF_LENGTH) {
+ count = sprintf(buf,
+@@ -89,7 +89,7 @@ int errprintf(const char *fmt, ...)
+
+ va_start(args, fmt);
+
+- count = vsprintf(buf, fmt, args);
++ count = vsnprintf(buf, sizeof(buf), fmt, args);
+ errwrite(buf, count);
+ if (count >= PRINTF_BUF_LENGTH) {
+ count = sprintf(buf,
+@@ -236,7 +236,7 @@ int gs_throw_imp(const char *func, const
+ va_list ap;
+
+ va_start(ap, fmt);
+- vsprintf(msg, fmt, ap);
++ vsnprintf(msg, sizeof(msg), fmt, ap);
+ msg[sizeof(msg) - 1] = 0;
+ va_end(ap);
+