aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorbeech <beech@FreeBSD.org>2008-07-22 12:13:02 +0800
committerbeech <beech@FreeBSD.org>2008-07-22 12:13:02 +0800
commitf81714d1d942e1d331d2830d9272ec0bf1cf40a0 (patch)
treeee5fc51bf1f457698f866dc2fd7c28345f7ec040 /print
parente4dbc1804f46d0e1df7b6b74d745fb794ba4a265 (diff)
downloadfreebsd-ports-gnome-f81714d1d942e1d331d2830d9272ec0bf1cf40a0.tar.gz
freebsd-ports-gnome-f81714d1d942e1d331d2830d9272ec0bf1cf40a0.tar.zst
freebsd-ports-gnome-f81714d1d942e1d331d2830d9272ec0bf1cf40a0.zip
- Minimal patch to prevent a buffer overflow.
PR: ports/125787 Submitted by: Pedro F. Giffuni <pfgshield-freebsd@yahoo.com>
Diffstat (limited to 'print')
-rw-r--r--print/nenscript/files/patch-main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/print/nenscript/files/patch-main.c b/print/nenscript/files/patch-main.c
new file mode 100644
index 000000000000..95f17f994811
--- /dev/null
+++ b/print/nenscript/files/patch-main.c
@@ -0,0 +1,11 @@
+--- main.c.orig 2008-07-19 14:32:26.000000000 -0500
++++ main.c 2008-07-19 14:34:12.000000000 -0500
+@@ -601,7 +601,7 @@
+ exit (1);
+ }
+ #else
+- sprintf (cmd, "%s %s", LPR, printername);
++ snprintf (cmd, sizeof(cmd), "%s %s", LPR, printername);
+ if ((outputstream = popen (cmd, "w")) == NULL) {
+ perror (LPR);
+ exit (1);