From 0974e4f2ac0005d3731e0b5c13ebc7e965540f4d Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Wed, 14 Jun 2023 09:08:12 +0100 Subject: [PATCH] Bug 706778: 706761 revisit Two problems with the original commit. The first a silly typo inverting the logic of a test. The second was forgetting that we actually actually validate two candidate strings for pipe devices. One with the expected "%pipe%" prefix, the other using the pipe character prefix: "|". This addresses both those. --- base/gpmisc.c | 2 +- base/gslibctx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/gpmisc.c b/base/gpmisc.c index 58511270e..2b0064bea 100644 --- a/base/gpmisc.c +++ b/base/gpmisc.c @@ -1081,7 +1081,7 @@ gp_validate_path_len(const gs_memory_t *mem, /* "%pipe%" do not follow the normal rules for path definitions, so we don't "reduce" them to avoid unexpected results */ - if (len > 5 && memcmp(path, "%pipe", 5) != 0) { + if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { bufferfull = buffer = (char *)gs_alloc_bytes(mem->thread_safe_memory, len + 1, "gp_validate_path"); if (buffer == NULL) return gs_error_VMerror; diff --git a/base/gslibctx.c b/base/gslibctx.c index d2a1aa91d..42af99090 100644 --- a/base/gslibctx.c +++ b/base/gslibctx.c @@ -743,7 +743,7 @@ gs_add_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, co /* "%pipe%" do not follow the normal rules for path definitions, so we don't "reduce" them to avoid unexpected results */ - if (len > 5 && memcmp(path, "%pipe", 5) != 0) { + if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_add_control_path_len"); if (buffer == NULL) return gs_error_VMerror; @@ -850,7 +850,7 @@ gs_remove_control_path_len_flags(const gs_memory_t *mem, gs_path_control_t type, /* "%pipe%" do not follow the normal rules for path definitions, so we don't "reduce" them to avoid unexpected results */ - if (len > 5 && memcmp(path, "%pipe", 5) != 0) { + if (path[0] == '|' || (len > 5 && memcmp(path, "%pipe", 5) == 0)) { buffer = (char *)gs_alloc_bytes(core->memory, len + 1, "gs_remove_control_path_len"); if (buffer == NULL) return gs_error_VMerror; -- 2.34.1 3705f53cc3619a1a43a33602aaecc3a8b'>The #guix channel is hosted by Libera Chat....* README (Contact): Update network name. * ROADMAP: Likewise. * doc/contributing.texi (Contributing): Likewise. * doc/guix.texi (After System Installation): Likewise. Tobias Geerinckx-Rice 2020-10-23doc: Update README....* README (Installation): Do not mention installing Guix from Git anymore. (Building from Git): Add section. Maxim Cournoyer 2020-10-22README: Refer to the manual for building from Git....* README (Installing Guix from Guix): Remove section. (Installation): For installing from Git, refer to the "Building from Git" section of the manual and suggest using './pre-inst-env guix pull' rather than 'make install' for installing Guix. Maxim Cournoyer 2020-06-02doc: Update README to refer to the manual....* README (Requirements): Refer to the manual. (Installation): Update URL of the manual. Ludovic Courtès 2019-11-09doc: Mention value /var to localstatedir option....* README (Installing Guix from Guix): Mention value /var to localstatedir option. * doc/contributing.texi (Building from Git): Likewise. * doc/guix.texi (Requirements): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> zimoun 2019-09-04doc: Update 'README'....* README: Update intro a bit. (Installing Guix as non-root): Remove as it's largely outdated. (Contact): Update. Ludovic Courtès 2019-01-09build: Require Guile 2.2....* configure.ac: Require Guile 2.2. * README: Adjust accordingly. * doc/guix.texi (Requirements): Likewise. * gnu/packages/package-management.scm (guile2.0-guix): Deprecate. (guix-minimal): Inherit from GUIX, not from GUILE2.0-GUIX. Ludovic Courtès 2018-12-02Make Guile-JSON a required dependency....* README (Requirements): Remove "optional" verbiage. * doc/guix.texi (Requirements): Move Guile-JSON from optional to required. * configure.ac (HAVE_GUILE_JSON): Remove Automake conditional. (have_guile_json): Error if not "yes". * Makefile.am (MODULE, SCM_TESTS)[HAVE_GUILE_JSON]: Add modules and tests unconditionally. * gnu/packages/package-mangement.scm (guix-minimal)[propagated-inputs]: Leave guile-json input. Eric Bavier 2018-11-23Update Guile-SQLite3 URL everywhere....* README: Update Guile-SQLite3 URL. * doc/guix.texi (Requirements): Likewise. * guix/store/database.scm (sqlite-exec): Likewise. * m4/guix.m4 (GUIX_CHECK_GUILE_SQLITE3): Likewise. Ludovic Courtès