View | Details | Raw Unified | Return to bug 73470
Collapse All | Expand All

(-)print/mpage/Makefile (-3 / +7 lines)
Lines 10-17 Link Here
10
# "Legal" (8.5" x 14").
10
# "Legal" (8.5" x 14").
11
11
12
PORTNAME=	mpage
12
PORTNAME=	mpage
13
PORTVERSION=	2.5.3
13
PORTVERSION=	2.5.4
14
PORTREVISION=	1
15
CATEGORIES=	print
14
CATEGORIES=	print
16
MASTER_SITES=	ftp://ftp.mesa.nl/pub/mpage/
15
MASTER_SITES=	ftp://ftp.mesa.nl/pub/mpage/
17
EXTRACT_SUFX=	.tgz
16
EXTRACT_SUFX=	.tgz
Lines 19-25 Link Here
19
MAINTAINER=	ports@FreeBSD.org
18
MAINTAINER=	ports@FreeBSD.org
20
COMMENT=	Print multiple pages per sheet of paper
19
COMMENT=	Print multiple pages per sheet of paper
21
20
22
MAN1=		mpage.1
23
ALL_TARGET=	default
21
ALL_TARGET=	default
22
23
MAN1=		mpage.1
24
PLIST_FILES=	bin/mpage %%DATADIR%%/CP850.PC %%DATADIR%%/ISO+STD+OTH \
25
		%%DATADIR%%/ISO-8859.1 %%DATADIR%%/ISO-8859.15 \
26
		%%DATADIR%%/ISO-Latin.1 %%DATADIR%%/ISO-Latin.2
27
PLIST_DIRS=	%%DATADIR%%
24
28
25
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)print/mpage/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (mpage-2.5.3.tgz) = 4724dcba203100384b4611be8adc900c
1
MD5 (mpage-2.5.4.tgz) = c14d58e24e7fdebe0c9eeb57ef1895f4
2
SIZE (mpage-2.5.3.tgz) = 82101
2
SIZE (mpage-2.5.4.tgz) = 93992
(-)print/mpage/files/patch-file_c (-27 / +25 lines)
Lines 1-6 Link Here
1
$OpenBSD: patch-file_c,v 1.2 2002/11/13 17:15:49 naddy Exp $
1
--- file.c.orig	Mon May 31 04:34:15 2004
2
--- file.c.orig	Sun Jun 16 02:56:44 2002
2
+++ file.c	Mon Nov  1 20:58:16 2004
3
+++ file.c	Mon Nov 11 06:54:23 2002
4
@@ -18,6 +18,7 @@
3
@@ -18,6 +18,7 @@
5
  */
4
  */
6
 
5
 
Lines 9-49 Link Here
9
 #include "mpage.h"
8
 #include "mpage.h"
10
 
9
 
11
 
10
 
12
@@ -101,10 +102,10 @@ do_pr_file(fname, asheet, outfd)
11
@@ -119,11 +120,11 @@
13
      * header or not
14
      */
12
      */
13
 #define DASHES "-- "
15
     if (opt_header != NULL)
14
     if (opt_header != NULL)
16
-        (void)sprintf(command, "%s -l%d -w%d -h \"%s\" %s", prprog,
15
-        (void)sprintf(command, "%s -l%d -w%d -h \"%s\" %s%s", prprog,
17
+        (void)snprintf(command, sizeof(command), "%s -l%d -w%d -h \"%s\" %s", prprog,
16
+        (void)snprintf(command, sizeof(command), "%s -l%d -w%d -h \"%s\" %s%s", prprog,
18
                   asheet->sh_plength, asheet->sh_cwidth, opt_header, fname);
17
                   asheet->sh_plength, asheet->sh_cwidth, opt_header,
18
                   fname[0] == '-' ? DASHES : "", fname);
19
     else
19
     else
20
-        (void)sprintf(command, "%s -l%d -w%d %s", prprog,
20
-        (void)sprintf(command, "%s -l%d -w%d %s%s", prprog,
21
+        (void)snprintf(command, sizeof(command), "%s -l%d -w%d %s", prprog,
21
+        (void)snprintf(command, sizeof(command), "%s -l%d -w%d %s%s", prprog,
22
                   asheet->sh_plength, asheet->sh_cwidth, fname);
22
                   asheet->sh_plength, asheet->sh_cwidth,
23
                   fname[0] == '-' ? DASHES : "", fname);
23
     /*
24
     /*
24
      * open a pipe to the proper pr(1) command, and pr provides
25
@@ -168,7 +169,7 @@
25
@@ -148,7 +149,7 @@ do_stdin(asheet, outfd)
26
      * but the tmpfilename
26
          * a temporary file; this temporary file will then
27
      */
27
          * be used as input to the do_doc routine
28
      
28
          */
29
-    (void) strcpy(tmpfile, "/usr/tmp/mpage-stdin-XXXXXX");
29
-        (void)strcpy(tmpfile, "/usr/tmp/mpageXXXXXX");
30
+    (void) strlcpy(tmpfile, "/tmp/mpage-stdin-XXXXXX", sizeof(tmpfile));
30
+        (void)strlcpy(tmpfile, "/tmp/mpageXXXXXX", sizeof(tmpfile));
31
     if ( (tmpfd = mkstemp(tmpfile)) == -1) {
31
         if ( (tmpfd = mkstemp(tmpfile)) == -1) {
32
         fprintf(stderr, "%s: cannot create temporary file", MPAGE);
32
             fprintf(stderr, "%s: cannot create temporary file", MPAGE);
33
         perror(MPAGE);
33
             perror(MPAGE);
34
@@ -217,11 +218,11 @@
34
@@ -156,11 +157,13 @@ do_stdin(asheet, outfd)
35
 	}
35
 	}
36
         close(tmpfd);
36
         close(tmpfd);
37
         if (opt_header != NULL)
37
         if (opt_header != NULL)
38
-            (void)sprintf(command, "%s -l%d -w%d -h \"%s\"> %s", prprog,
38
-            (void)sprintf(command, "%s -l%d -w%d -h \"%s\" > %s", prprog,
39
+            (void)snprintf(command, sizeof(command), 
39
+            (void)snprintf(command, sizeof(command), "%s -l%d -w%d -h \"%s\" > %s", prprog,
40
+		    "%s -l%d -w%d -h \"%s\"> %s", prprog,
41
                       asheet->sh_plength, asheet->sh_cwidth,
40
                       asheet->sh_plength, asheet->sh_cwidth,
42
                       opt_header, tmpfile);
41
                       opt_header, tmpfile);
43
         else
42
         else
44
-            (void)sprintf(command, "%s -l%d -w%d > %s", prprog,
43
-            (void)sprintf(command, "%s -l%d -w%d > %s", prprog,
45
+            (void)snprintf(command, sizeof(command),
44
+            (void)snprintf(command, sizeof(command), "%s -l%d -w%d > %s", prprog,
46
+		    "%s -l%d -w%d > %s", prprog,
47
                       asheet->sh_plength, asheet->sh_cwidth, tmpfile);
45
                       asheet->sh_plength, asheet->sh_cwidth, tmpfile);
48
         /*
46
         /*
49
          * open a pipe to the pr(1) command which will create a
47
          * open a pipe to the pr(1) command which will create a
(-)print/mpage/pkg-plist (-8 lines)
Lines 1-8 Link Here
1
bin/mpage
2
share/mpage/CP850.PC
3
share/mpage/ISO+STD+OTH
4
share/mpage/ISO-8859.1
5
share/mpage/ISO-8859.15
6
share/mpage/ISO-Latin.1
7
share/mpage/ISO-Latin.2
8
@dirrm share/mpage

Return to bug 73470