bash: version bump to 4.4.12
[feed/packages.git] / utils / bash / patches / 106-upstream-bash44-006.patch
1 Index: bash-4.4/builtins/pushd.def
2 ===================================================================
3 --- bash-4.4.orig/builtins/pushd.def
4 +++ bash-4.4/builtins/pushd.def
5 @@ -365,7 +365,7 @@ popd_builtin (list)
6 break;
7 }
8
9 - if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
10 + if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0))
11 {
12 pushd_error (directory_list_offset, which_word ? which_word : "");
13 return (EXECUTION_FAILURE);
14 @@ -387,6 +387,11 @@ popd_builtin (list)
15 remove that directory from the list and shift the remainder
16 of the list into place. */
17 i = (direction == '+') ? directory_list_offset - which : which;
18 + if (i < 0 || i > directory_list_offset)
19 + {
20 + pushd_error (directory_list_offset, which_word ? which_word : "");
21 + return (EXECUTION_FAILURE);
22 + }
23 free (pushd_directory_list[i]);
24 directory_list_offset--;
25
26 Index: bash-4.4/patchlevel.h
27 ===================================================================
28 --- bash-4.4.orig/patchlevel.h
29 +++ bash-4.4/patchlevel.h
30 @@ -25,6 +25,6 @@
31 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
32 looks for to find the patch level (for the sccs version string). */
33
34 -#define PATCHLEVEL 5
35 +#define PATCHLEVEL 6
36
37 #endif /* _PATCHLEVEL_H_ */