diff options
author | Christoph M. Becker <cmb@php.net> | 2015-07-23 14:11:28 +0200 |
---|---|---|
committer | Christoph M. Becker <cmb@php.net> | 2015-07-28 01:04:55 +0200 |
commit | 4e8f01cb6e75e09ad7ffa5201c42d1bea2a61264 (patch) | |
tree | 7b1d8d6ac7c818b138a3835e61270d5c94ceaab6 | |
parent | 33a91f57e9a749e62631ccc76b850b17fde218ee (diff) | |
download | php-git-4e8f01cb6e75e09ad7ffa5201c42d1bea2a61264.tar.gz |
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.
-rw-r--r-- | win32/readdir.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/readdir.h b/win32/readdir.h index f1fb3a736f..d9ae477af0 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 */ |