diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /testing/source/bash/bash-4.0-patches/bash40-024 | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'testing/source/bash/bash-4.0-patches/bash40-024')
-rw-r--r-- | testing/source/bash/bash-4.0-patches/bash40-024 | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/testing/source/bash/bash-4.0-patches/bash40-024 b/testing/source/bash/bash-4.0-patches/bash40-024 new file mode 100644 index 00000000..ac2058ae --- /dev/null +++ b/testing/source/bash/bash-4.0-patches/bash40-024 @@ -0,0 +1,112 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-024 + +Bug-Reported-by: Matt Zyzik <matt.zyzik@nyu.edu> +Bug-Reference-ID: <20090405205428.4FDEA1C7175@ice.filescope.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-04/msg00021.html + +Bug-Description: + +When using the ** globbing operator, bash will incorrectly add an extra +directory name when the preceding directory name ends with `*' or an empty +string when there is no preceding directory name. + +Patch: + +*** ../bash-4.0-patched/lib/glob/glob.c 2009-01-04 14:32:30.000000000 -0500 +--- lib/glob/glob.c 2009-04-28 10:22:29.000000000 -0400 +*************** +*** 357,361 **** + if (ep) + *ep = 0; +! if (r) + free (r); + return (struct globval *)0; +--- 357,361 ---- + if (ep) + *ep = 0; +! if (r && r != &glob_error_return) + free (r); + return (struct globval *)0; +*************** +*** 666,671 **** + } + +! /* compat: if GX_ALLDIRS, add the passed directory also */ +! if (add_current) + { + sdlen = strlen (dir); +--- 666,672 ---- + } + +! /* compat: if GX_ALLDIRS, add the passed directory also, but don't add an +! empty directory name. */ +! if (add_current && (flags & GX_NULLDIR) == 0) + { + sdlen = strlen (dir); +*************** +*** 679,686 **** + nextlink->next = lastlink; + lastlink = nextlink; +! if (flags & GX_NULLDIR) +! nextname[0] = '\0'; +! else +! bcopy (dir, nextname, sdlen + 1); + ++count; + } +--- 680,684 ---- + nextlink->next = lastlink; + lastlink = nextlink; +! bcopy (dir, nextname, sdlen + 1); + ++count; + } +*************** +*** 943,947 **** + register unsigned int l; + +! array = glob_dir_to_array (directories[i], temp_results, flags); + l = 0; + while (array[l] != NULL) +--- 941,950 ---- + register unsigned int l; + +! /* If we're expanding **, we don't need to glue the directory +! name to the results; we've already done it in glob_vector */ +! if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0') +! array = temp_results; +! else +! array = glob_dir_to_array (directories[i], temp_results, flags); + l = 0; + while (array[l] != NULL) +*************** +*** 960,964 **** + + /* Note that the elements of ARRAY are not freed. */ +! free ((char *) array); + } + } +--- 963,968 ---- + + /* Note that the elements of ARRAY are not freed. */ +! if (array != temp_results) +! free ((char *) array); + } + } +*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 24 + + #endif /* _PATCHLEVEL_H_ */ |