Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  fix possible out of bounds buffer access
This commit is contained in:
Anatol Belski 2017-04-03 15:22:04 +02:00
commit 3438e62b30

View File

@ -380,7 +380,7 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat) /* {{
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
size_t len = strlen(path);
if (path[len-4] == '.') {
if (len >= 4 && path[len-4] == '.') {
if (_memicmp(path+len-3, "exe", 3) == 0 ||
_memicmp(path+len-3, "com", 3) == 0 ||
_memicmp(path+len-3, "bat", 3) == 0 ||