openbsd-ports/print/mpage/patches/patch-mpage_c
jasper 9ba3b19ab3 - update mpage to 2.5.6
- update maintainer address
- regen plist

from ian mcwilliam (MAINTAINER)
2010-05-26 13:53:16 +00:00

17 lines
727 B
Plaintext

$OpenBSD: patch-mpage_c,v 1.2 2010/05/26 13:53:16 jasper Exp $
--- mpage.c.orig Wed Jan 9 21:47:07 2008
+++ mpage.c Wed Mar 24 12:13:27 2010
@@ -79,10 +79,10 @@ char **argv;
*/
if (doprint) {
if (printque != NULL)
- (void) sprintf(outcommand, "%s %s%s",
+ (void) snprintf(outcommand, sizeof(outcommand), "%s %s%s",
printprog, printarg, printque);
else
- (void) strcpy(outcommand, printprog);
+ (void) strlcpy(outcommand, printprog, sizeof(outcommand));
if ((outfd = popen(outcommand, "w")) == NULL) {
fprintf(stderr, "%s: cannot create pipe for '%s'\n",
MPAGE, outcommand);