From 33c16e75c986fef1a302d50698519d52cf261682 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 9 Dec 2009 04:26:56 +0000 Subject: Fix crash when -name option doesn't contain an underscore git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1039 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pamtouil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'converter/other') diff --git a/converter/other/pamtouil.c b/converter/other/pamtouil.c index 209ebf16..1a53be0f 100644 --- a/converter/other/pamtouil.c +++ b/converter/other/pamtouil.c @@ -97,7 +97,7 @@ parseCommandLine(int argc, char ** argv, /* Remove trailing "_icon" */ barPos = strrchr(cmdlineP->outname, '_'); - if (streq(barPos, "_icon")) + if (barPos && streq(barPos, "_icon")) *barPos = '\0'; } else { if (streq(cmdlineP->inputFilespec, "-")) -- cgit 1.4.1