You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4 KiB

  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. - if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
  9. + if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0))
  10. {
  11. pushd_error (directory_list_offset, which_word ? which_word : "");
  12. return (EXECUTION_FAILURE);
  13. @@ -387,6 +387,11 @@ popd_builtin (list)
  14. remove that directory from the list and shift the remainder
  15. of the list into place. */
  16. i = (direction == '+') ? directory_list_offset - which : which;
  17. + if (i < 0 || i > directory_list_offset)
  18. + {
  19. + pushd_error (directory_list_offset, which_word ? which_word : "");
  20. + return (EXECUTION_FAILURE);
  21. + }
  22. free (pushd_directory_list[i]);
  23. directory_list_offset--;
  24. Index: bash-4.4/patchlevel.h
  25. ===================================================================
  26. --- bash-4.4.orig/patchlevel.h
  27. +++ bash-4.4/patchlevel.h
  28. @@ -25,6 +25,6 @@
  29. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  30. looks for to find the patch level (for the sccs version string). */
  31. -#define PATCHLEVEL 5
  32. +#define PATCHLEVEL 6
  33. #endif /* _PATCHLEVEL_H_ */