From 169d04a4bae264e4801f2ee58ffe041f9b00cac3 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 08:17:49 +0000 Subject: Apply patch bash-4.4-patch-6.patch patch_name: bash-4.4-patch-6.patch present_in_specfile: true location_in_specfile: 6 --- diff --git a/builtins/pushd.def b/builtins/pushd.def index 82653c4..6579e4c 100644 --- a/builtins/pushd.def +++ b/builtins/pushd.def @@ -365,7 +365,7 @@ popd_builtin (list) break; } - if (which > directory_list_offset || (directory_list_offset == 0 && which == 0)) + if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0)) { pushd_error (directory_list_offset, which_word ? which_word : ""); return (EXECUTION_FAILURE); @@ -387,6 +387,11 @@ popd_builtin (list) remove that directory from the list and shift the remainder of the list into place. */ i = (direction == '+') ? directory_list_offset - which : which; + if (i < 0 || i > directory_list_offset) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); + return (EXECUTION_FAILURE); + } free (pushd_directory_list[i]); directory_list_offset--; diff --git a/patchlevel.h b/patchlevel.h index 1bc098b..14bff9f 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 5 +#define PATCHLEVEL 6 #endif /* _PATCHLEVEL_H_ */