freebsd-ports/print/nenscript/files/patch-main.c
Beech Rintoul 8bbebbeb2b - Minimal patch to prevent a buffer overflow.
PR:		ports/125787
Submitted by:	Pedro F. Giffuni <pfgshield-freebsd@yahoo.com>
2008-07-22 04:13:02 +00:00

11 lines
350 B
C

--- 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);