com php-src: Fix #36365: scandir duplicates file name at every 65535th file: win32/readdir.h
| From: | Christoph Michael Becker | Date: | Mon, 27 Jul 2015 23:04:55 +0000 |
| Subject: | com php-src: Fix #36365: scandir duplicates file name at every 65535th file: win32/readdir.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88188@lists.php.net to get a copy of this message | ||
Commit: 4e8f01cb6e75e09ad7ffa5201c42d1bea2a61264
Author: Christoph M. Becker <cmb@php.net> Thu, 23 Jul 2015 14:11:28 +0200
Parents: 33a91f57e9a749e62631ccc76b850b17fde218ee
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e8f01cb6e75e09ad7ffa5201c42d1bea2a61264
Log:
Fix #36365: scandir duplicates file name at every 65535th file
Due to DIR.offset being declared as short we have an overflow. This patch
changes the field to int.
Bugs:
https://bugs.php.net/36365
Changed paths:
M win32/readdir.h
Diff:
diff --git a/win32/readdir.h b/win32/readdir.h
index f1fb3a7..d9ae477 100644
--- a/win32/readdir.h
+++ b/win32/readdir.h
@@ -32,7 +32,7 @@ struct dirent {
/* typedef DIR - not the same as Unix */
typedef struct {
HANDLE handle; /* _findfirst/_findnext handle */
- short offset; /* offset into directory */
+ int offset; /* offset into directory */
short finished; /* 1 if there are not more files */
WIN32_FIND_DATA fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */