netpbm/netpbm-10.26.44-pamtouil.patch

12 lines
369 B
Diff

--- converter/other/pamtouil.c
+++ converter/other/pamtouil.c
@@ -94,7 +94,7 @@
/* Remove trailing "_icon" */
barPos = strrchr(cmdlineP->outname, '_');
- if (strcmp(barPos, "_icon") == 0)
+ if (barPos && strcmp(barPos, "_icon") == 0)
*barPos = '\0';
} else {
if (strcmp(cmdlineP->inputFilespec, "-") == 0)