From a2783a33002becda80d05f3795d91dbacd624b70 Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Wed, 23 Mar 2005 10:53:35 +0000 Subject: [PATCH] - fix segfault in ppmcolormask with stdin Submitted by: Peter Jeremy Approved by: portmgr (marcus) --- graphics/netpbm/Makefile | 1 + graphics/netpbm/files/patch-lib-libpm.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 graphics/netpbm/files/patch-lib-libpm.c diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile index a42925d1a8b6..209e82453d71 100644 --- a/graphics/netpbm/Makefile +++ b/graphics/netpbm/Makefile @@ -7,6 +7,7 @@ PORTNAME= netpbm PORTVERSION= 10.26.5 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/graphics/netpbm/files/patch-lib-libpm.c b/graphics/netpbm/files/patch-lib-libpm.c new file mode 100644 index 000000000000..a39128efa590 --- /dev/null +++ b/graphics/netpbm/files/patch-lib-libpm.c @@ -0,0 +1,20 @@ +--- lib/libpm.c~ Sun Nov 21 03:55:27 2004 ++++ lib/libpm.c Sat Mar 19 12:39:00 2005 +@@ -617,7 +617,7 @@ + pm_openr(const char * const name) { + FILE* f; + +- if (strcmp(name, "-") == 0) ++ if (name == NULL || strcmp(name, "-") == 0) + f = stdin; + else { + #ifndef VMS +@@ -639,7 +639,7 @@ + pm_openw(const char * const name) { + FILE* f; + +- if (strcmp(name, "-") == 0) ++ if (name == NULL || strcmp(name, "-") == 0) + f = stdout; + else { + #ifndef VMS