From ecfbc3126834e442edb309112e8995df9f10daa4 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 5 Sep 2018 13:19:51 +0100 Subject: Revert previous fix for Bug 699699. Revert "Bug 699699 "Crash upon bogus input argument."" (commit b509290189f1f37a76339f7b6921d42f126bfd57). This reopens bug 699699, so we can fix it in a way that doesn't return 1 for 'empty' arguments. This reopens bug 699699. --- base/gsargs.c | 2 +- psi/imainarg.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/base/gsargs.c b/base/gsargs.c index 267aeeb13..c1c1869be 100644 --- a/base/gsargs.c +++ b/base/gsargs.c @@ -348,7 +348,7 @@ arg_next(arg_list * pal, const char **argstr, const gs_memory_t *errmem) *argstr = NULL; /* Empty the argument string so we don't return it. */ continue; /* Loop back to parse the first arg from the file. */ } - } while (pal->depth >= 0 && *argstr != NULL && **argstr == 0); /* Until we get a non-empty arg */ + } while (**argstr == 0); /* Until we get a non-empty arg */ return 1; } diff --git a/psi/imainarg.c b/psi/imainarg.c index 76ede0c71..869a7aad4 100644 --- a/psi/imainarg.c +++ b/psi/imainarg.c @@ -693,8 +693,6 @@ run_stdin: return code; } else adef = arg; - if (adef == NULL) - return_error(gs_error_invalidfileaccess); if ((code = gs_main_init1(minst)) < 0) return code; ialloc_set_space(idmemory, avm_system); -- cgit v1.2.1