--- embedaddon/php/main/streams/glob_wrapper.c 2012/02/21 23:48:05 1.1.1.1 +++ embedaddon/php/main/streams/glob_wrapper.c 2014/06/15 20:04:01 1.1.1.4 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: glob_wrapper.c,v 1.1.1.1 2012/02/21 23:48:05 misho Exp $ */ +/* $Id: glob_wrapper.c,v 1.1.1.4 2014/06/15 20:04:01 misho Exp $ */ #include "php.h" #include "php_streams_int.h" @@ -145,7 +145,7 @@ static size_t php_glob_stream_read(php_stream *stream, /* avoid problems if someone mis-uses the stream */ if (count == sizeof(php_stream_dirent) && pglob) { - if (pglob->index < pglob->glob.gl_pathc) { + if (pglob->index < (size_t)pglob->glob.gl_pathc) { php_glob_stream_path_split(pglob, pglob->glob.gl_pathv[pglob->index++], pglob->flags & GLOB_APPEND, &path TSRMLS_CC); PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); return sizeof(php_stream_dirent);