Magellan Linux

Annotation of /trunk/glibc/patches/glibc-2.16.0-glob-use-size_t.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1925 - (hide annotations) (download)
Sun Oct 28 19:05:24 2012 UTC (11 years, 7 months ago) by niro
File size: 1469 byte(s)
-more glibc-2.16 fixes
1 niro 1925 diff --git a/posix/glob.c b/posix/glob.c
2     index 68ea205..87d4f1b 100644
3     --- a/posix/glob.c
4     +++ b/posix/glob.c
5     @@ -217,7 +217,7 @@ static int collated_compare (const void *, const void *) __THROW;
6     static const char *
7     next_brace_sub (const char *cp, int flags)
8     {
9     - unsigned int depth = 0;
10     + size_t depth = 0;
11     while (*cp != '\0')
12     if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\')
13     {
14     @@ -960,7 +960,7 @@ glob (pattern, flags, errfunc, pglob)
15     && S_ISDIR (st.st_mode))
16     : (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode)))))
17     {
18     - int newcount = pglob->gl_pathc + pglob->gl_offs;
19     + size_t newcount = pglob->gl_pathc + pglob->gl_offs;
20     char **new_gl_pathv;
21    
22     if (newcount > UINTPTR_MAX - (1 + 1)
23     @@ -1059,7 +1059,7 @@ glob (pattern, flags, errfunc, pglob)
24     appending the results to PGLOB. */
25     for (i = 0; i < dirs.gl_pathc; ++i)
26     {
27     - int old_pathc;
28     + size_t old_pathc;
29    
30     #ifdef SHELL
31     {
32     @@ -1114,7 +1114,7 @@ glob (pattern, flags, errfunc, pglob)
33     /* No matches. */
34     if (flags & GLOB_NOCHECK)
35     {
36     - int newcount = pglob->gl_pathc + pglob->gl_offs;
37     + size_t newcount = pglob->gl_pathc + pglob->gl_offs;
38     char **new_gl_pathv;
39    
40     if (newcount > UINTPTR_MAX - 2
41     @@ -1158,7 +1158,7 @@ glob (pattern, flags, errfunc, pglob)
42     }
43     else
44     {
45     - int old_pathc = pglob->gl_pathc;
46     + size_t old_pathc = pglob->gl_pathc;
47     int orig_flags = flags;
48    
49     if (meta & 2)
50     --
51     1.7.3.4