diff options
author | beech <beech@FreeBSD.org> | 2008-07-22 12:13:02 +0800 |
---|---|---|
committer | beech <beech@FreeBSD.org> | 2008-07-22 12:13:02 +0800 |
commit | f81714d1d942e1d331d2830d9272ec0bf1cf40a0 (patch) | |
tree | ee5fc51bf1f457698f866dc2fd7c28345f7ec040 /print | |
parent | e4dbc1804f46d0e1df7b6b74d745fb794ba4a265 (diff) | |
download | freebsd-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.c | 11 |
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); |