Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 09236aad26217818763c178cc3a83744 > files > 1

ghostscript-9.24-1.5.mga6.src.rpm

From 01514a0c6add9cbafe3c3ba55f57968154d2b323 Mon Sep 17 00:00:00 2001
From: Robin Watts <robin.watts@artifex.com>
Date: Wed, 5 Sep 2018 16:42:44 +0100
Subject: [PATCH] Bug 699719: Fix @ files in arg handling.

When we met an @file in the arg handling, we were failing to swallow
it and returning "@file" to the caller.
---
 base/gsargs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/base/gsargs.c b/base/gsargs.c
index 4edc77c..267aeeb 100644
--- a/base/gsargs.c
+++ b/base/gsargs.c
@@ -345,6 +345,7 @@ arg_next(arg_list * pal, const char **argstr, const gs_memory_t *errmem)
             pas = &pal->sources[++pal->depth];
             pas->is_file = true;
             pas->u.file = f;
+            *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 */
-- 
2.9.1