From: Chet Ramey Date: Wed, 10 Jun 2026 12:58:29 +0000 (-0400) Subject: Bash-5.3 patch 14: update mapfile patch 11, removing stray line and improving the... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a833685ecb9681b611b9c4c44b2e4c40932fcd6f;p=thirdparty%2Fbash.git Bash-5.3 patch 14: update mapfile patch 11, removing stray line and improving the efficiency of the original fix --- diff --git a/builtins/mapfile.def b/builtins/mapfile.def index 71fb8196..662dba23 100644 --- a/builtins/mapfile.def +++ b/builtins/mapfile.def @@ -197,16 +197,16 @@ mapfile (int fd, long line_count_goal, long origin, long nskip, long callback_qu zsyncfd (fd); run_callback (callback, array_index, line); - } - - /* Bad things can happen if the callback modifies ENTRY, e.g., - unsetting it or changing it to a non-indexed-array type, so we - look it up again every time we need to assign something */ - entry = bind_array_variable (array_name, array_index, line, 0); - if (entry == 0 || ASSIGN_DISALLOWED (entry, 0)) - return EXECUTION_FAILURE; - bind_array_element (entry, array_index, line, 0); + /* Bad things can happen if the callback modifies ENTRY, e.g., + unsetting it or changing it to a non-indexed-array type, so we + look it up again every time we need to assign something */ + entry = bind_array_variable (array_name, array_index, line, 0); + if (entry == 0 || ASSIGN_DISALLOWED (entry, 0)) + return EXECUTION_FAILURE; + } + else + bind_array_element (entry, array_index, line, 0); /* Have we exceeded # of lines to store? */ line_count++; diff --git a/patchlevel.h b/patchlevel.h index 492f98f7..79e18af4 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 13 +#define PATCHLEVEL 14 #endif /* _PATCHLEVEL_H_ */