openbsd-ports/print/mpage/patches/patch-mpage_c
naddy b064a31906 * Update to 2.5.2.
* All-around clean-up.
* Fix licensing information.

Once upon a time okayed by maintainer.
2002-07-07 17:03:36 +00:00

17 lines
726 B
Plaintext

$OpenBSD: patch-mpage_c,v 1.1 2002/07/07 17:03:37 naddy Exp $
--- mpage.c.orig Tue Nov 13 18:04:46 2001
+++ mpage.c Sun May 19 01:00:14 2002
@@ -74,10 +74,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);