diff options
author | Anatol Belski <ab@php.net> | 2017-04-03 15:22:04 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-04-03 15:22:04 +0200 |
commit | 3438e62b3061065ad7fc8f42a5b6003b7b8716a3 (patch) | |
tree | f1847ff4b8e9b2a81b3abfd7011ef8cc93244b17 /Zend | |
parent | 2ec54af8df76483a77681e050f93ea17bd0905ec (diff) | |
parent | feeb35e438db36f08bb82d493b11d4211201f23c (diff) | |
download | php-git-3438e62b3061065ad7fc8f42a5b6003b7b8716a3.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
fix possible out of bounds buffer access
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_virtual_cwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index 0f388dc638..c42739a744 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -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 || |