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