aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/netpbm/files
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2005-03-23 18:53:35 +0800
committerdinoex <dinoex@FreeBSD.org>2005-03-23 18:53:35 +0800
commit19700df4b4090cdc2e0ad9870a09772d77a17962 (patch)
tree7a06847e21b1e1113272545c913feed98981ff55 /graphics/netpbm/files
parent5952a1485983cc335c6100d3011acb2246d2d68f (diff)
downloadfreebsd-ports-gnome-19700df4b4090cdc2e0ad9870a09772d77a17962.tar.gz
freebsd-ports-gnome-19700df4b4090cdc2e0ad9870a09772d77a17962.tar.zst
freebsd-ports-gnome-19700df4b4090cdc2e0ad9870a09772d77a17962.zip
- fix segfault in ppmcolormask with stdin
Submitted by: Peter Jeremy Approved by: portmgr (marcus)
Diffstat (limited to 'graphics/netpbm/files')
-rw-r--r--graphics/netpbm/files/patch-lib-libpm.c20
1 files changed, 20 insertions, 0 deletions
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