]>
Commit | Line | Data |
---|---|---|
a8c304fb ER |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 3.1 | |
5 | Patch-ID: bash31-015 | |
6 | ||
7 | Bug-Reported-by: Benoit Vila | |
8 | Bug-Reference-ID: <43FCA614.1090108@free.fr> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-02/msg00058.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | A problem with the extended globbing code prevented dots from matching | |
14 | filenames when used in some extended matching patterns. | |
15 | ||
16 | Patch: | |
17 | ||
18 | *** ../bash-3.1-patched/lib/glob/sm_loop.c Sun Oct 16 21:21:04 2005 | |
19 | --- lib/glob/sm_loop.c Mon Feb 27 17:18:43 2006 | |
20 | *************** | |
21 | *** 639,643 **** | |
22 | CHAR *pnext; /* pointer to next sub-pattern */ | |
23 | CHAR *srest; /* pointer to rest of string */ | |
24 | ! int m1, m2; | |
25 | ||
26 | #if DEBUG_MATCHING | |
27 | --- 638,642 ---- | |
28 | CHAR *pnext; /* pointer to next sub-pattern */ | |
29 | CHAR *srest; /* pointer to rest of string */ | |
30 | ! int m1, m2, xflags; /* xflags = flags passed to recursive matches */ | |
31 | ||
32 | #if DEBUG_MATCHING | |
33 | *************** | |
34 | *** 645,648 **** | |
35 | --- 644,648 ---- | |
36 | fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se); | |
37 | fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); | |
38 | + fprintf(stderr, "extmatch: flags = %d\n", flags); | |
39 | #endif | |
40 | ||
41 | *************** | |
42 | *** 678,683 **** | |
43 | multiple matches of the pattern. */ | |
44 | if (m1) | |
45 | ! m2 = (GMATCH (srest, se, prest, pe, flags) == 0) || | |
46 | ! (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0); | |
47 | if (m1 && m2) | |
48 | return (0); | |
49 | --- 678,687 ---- | |
50 | multiple matches of the pattern. */ | |
51 | if (m1) | |
52 | ! { | |
53 | ! /* if srest > s, we are not at start of string */ | |
54 | ! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; | |
55 | ! m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) || | |
56 | ! (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0); | |
57 | ! } | |
58 | if (m1 && m2) | |
59 | return (0); | |
60 | *************** | |
61 | *** 705,710 **** | |
62 | for ( ; srest <= se; srest++) | |
63 | { | |
64 | if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && | |
65 | ! GMATCH (srest, se, prest, pe, flags) == 0) | |
66 | return (0); | |
67 | } | |
68 | --- 709,716 ---- | |
69 | for ( ; srest <= se; srest++) | |
70 | { | |
71 | + /* if srest > s, we are not at start of string */ | |
72 | + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; | |
73 | if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && | |
74 | ! GMATCH (srest, se, prest, pe, xflags) == 0) | |
75 | return (0); | |
76 | } | |
77 | *************** | |
78 | *** 727,731 **** | |
79 | break; | |
80 | } | |
81 | ! if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0) | |
82 | return (0); | |
83 | } | |
84 | --- 733,739 ---- | |
85 | break; | |
86 | } | |
87 | ! /* if srest > s, we are not at start of string */ | |
88 | ! xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; | |
89 | ! if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0) | |
90 | return (0); | |
91 | } | |
92 | *** ../bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005 | |
93 | --- patchlevel.h Wed Dec 7 13:48:42 2005 | |
94 | *************** | |
95 | *** 26,30 **** | |
96 | looks for to find the patch level (for the sccs version string). */ | |
97 | ||
98 | ! #define PATCHLEVEL 14 | |
99 | ||
100 | #endif /* _PATCHLEVEL_H_ */ | |
101 | --- 26,30 ---- | |
102 | looks for to find the patch level (for the sccs version string). */ | |
103 | ||
104 | ! #define PATCHLEVEL 15 | |
105 | ||
106 | #endif /* _PATCHLEVEL_H_ */ |