dmitry Sun Apr 22 10:25:18 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/win32 registry.c Log: Fixed buffer overflow http://cvs.php.net/viewvc.cgi/php-src/win32/registry.c?r1=1.16.4.3&r2=1.16.4.4&diff_format=u Index: php-src/win32/registry.c diff -u php-src/win32/registry.c:1.16.4.3 php-src/win32/registry.c:1.16.4.4 --- php-src/win32/registry.c:1.16.4.3 Sat Feb 24 02:17:28 2007 +++ php-src/win32/registry.c Sun Apr 22 10:25:18 2007 @@ -133,10 +133,12 @@ if (path_len) { memcpy(new_path, path, path_len); new_path[path_len] = '/'; - path_len++; + memcpy(new_path+path_len+1, name, name_len+1); + zend_str_tolower(new_path, path_len+name_len+1); + } else { + memcpy(new_path, name, name_len+1); + zend_str_tolower(new_path, name_len); } - memcpy(new_path+path_len, name, name_len+1); - zend_str_tolower(new_path, path_len+name_len); if (LoadDirectory(directories, subkey, new_path, path_len+name_len, ht)) { ret = 1; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php