Merge branch 'PHP-5.5'

* PHP-5.5:
  fix buffer overrun
This commit is contained in:
Anatol Belski 2013-07-15 17:35:52 +02:00
commit fb91fc6e2c

View File

@ -802,7 +802,12 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC)
char path_bak[MAXPATHLEN];
#endif
#if PHP_WIN32
/* MAX_PATH is \0-terminated, path_len == MAXPATHLEN would overrun path_bak */
if (path_len >= MAXPATHLEN) {
#else
if (path_len > MAXPATHLEN) {
#endif
return;
}