[Freeswitch-svn] [commit] r9315 - freeswitch/trunk/src
Freeswitch SVN
robertj at freeswitch.org
Sun Aug 17 19:08:10 EDT 2008
Author: robertj
Date: Sun Aug 17 19:08:10 2008
New Revision: 9315
Modified:
freeswitch/trunk/src/switch_xml.c
Log:
Fixed infinite loop caused by 64 bit cleansing change (int to size_t means signed to unsigned)
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Sun Aug 17 19:08:10 2008
@@ -2551,7 +2551,7 @@
size_t newsize, len;
const char *p;
- if (*limit && pglob->gl_pathc > (unsigned int)(*limit)) {
+ if (*limit && pglob->gl_pathc > *limit) {
errno = 0;
return (GLOB_NOSPACE);
}
@@ -2571,7 +2571,7 @@
if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
/* first time around -- clear initial gl_offs items */
pathv += pglob->gl_offs;
- for (i = pglob->gl_offs; --i >= 0; )
+ for (i = pglob->gl_offs; i-- > 0; )
*--pathv = NULL;
}
pglob->gl_pathv = pathv;
More information about the Freeswitch-svn
mailing list