forked from Mirrors/freeswitch
Fixed infinite loop caused by 64 bit cleansing change (int to size_t means signed to unsigned)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9315 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8580a0534d
commit
1bbf3a8244
@ -2551,7 +2551,7 @@ static int globextend(const char *path, glob_t *pglob, size_t *limit)
|
|||||||
size_t newsize, len;
|
size_t newsize, len;
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
if (*limit && pglob->gl_pathc > (unsigned int)(*limit)) {
|
if (*limit && pglob->gl_pathc > *limit) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
return (GLOB_NOSPACE);
|
return (GLOB_NOSPACE);
|
||||||
}
|
}
|
||||||
@ -2571,7 +2571,7 @@ static int globextend(const char *path, glob_t *pglob, size_t *limit)
|
|||||||
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
|
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
|
||||||
/* first time around -- clear initial gl_offs items */
|
/* first time around -- clear initial gl_offs items */
|
||||||
pathv += pglob->gl_offs;
|
pathv += pglob->gl_offs;
|
||||||
for (i = pglob->gl_offs; --i >= 0; )
|
for (i = pglob->gl_offs; i-- > 0; )
|
||||||
*--pathv = NULL;
|
*--pathv = NULL;
|
||||||
}
|
}
|
||||||
pglob->gl_pathv = pathv;
|
pglob->gl_pathv = pathv;
|
||||||
|
Loading…
Reference in New Issue
Block a user