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.

39 lines
1.1 KiB

  1. Index: bash-4.4/lib/glob/sm_loop.c
  2. ===================================================================
  3. --- bash-4.4.orig/lib/glob/sm_loop.c
  4. +++ bash-4.4/lib/glob/sm_loop.c
  5. @@ -330,6 +330,12 @@ PARSE_COLLSYM (p, vp)
  6. for (pc = 0; p[pc]; pc++)
  7. if (p[pc] == L('.') && p[pc+1] == L(']'))
  8. break;
  9. + if (p[pc] == 0)
  10. + {
  11. + if (vp)
  12. + *vp = INVALID;
  13. + return (p + pc);
  14. + }
  15. val = COLLSYM (p, pc);
  16. if (vp)
  17. *vp = val;
  18. @@ -483,6 +489,9 @@ BRACKMATCH (p, test, flags)
  19. c = *p++;
  20. c = FOLD (c);
  21. + if (c == L('\0'))
  22. + return ((test == L('[')) ? savep : (CHAR *)0);
  23. +
  24. if ((flags & FNM_PATHNAME) && c == L('/'))
  25. /* [/] can never match when matching a pathname. */
  26. return (CHAR *)0;
  27. Index: bash-4.4/patchlevel.h
  28. ===================================================================
  29. --- bash-4.4.orig/patchlevel.h
  30. +++ bash-4.4/patchlevel.h
  31. @@ -25,6 +25,6 @@
  32. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  33. looks for to find the patch level (for the sccs version string). */
  34. -#define PATCHLEVEL 2
  35. +#define PATCHLEVEL 3
  36. #endif /* _PATCHLEVEL_H_ */