]> git.pld-linux.org Git - packages/php.git/blame - php-5.3.7-bug-48465.patch
move php.1 manual to -program (link to actual php-cli)
[packages/php.git] / php-5.3.7-bug-48465.patch
CommitLineData
fb98beff
ER
1--- PHP_5_3/main/php_open_temporary_file.c 2011/03/28 16:34:07 309791
2+++ PHP_5_3/main/php_open_temporary_file.c 2011/03/28 16:43:49 309792
3@@ -204,9 +204,13 @@
4 */
5 {
6 char sTemp[MAX_PATH];
7- DWORD n = GetTempPath(sizeof(sTemp),sTemp);
8- assert(0 < n); /* should *never* fail! */
9- temporary_directory = strdup(sTemp);
10+ DWORD len = GetTempPath(sizeof(sTemp),sTemp);
11+ assert(0 < len); /* should *never* fail! */
12+ if (sTemp[len - 1] == DEFAULT_SLASH) {
13+ temporary_directory = zend_strndup(sTemp, len - 1);
14+ } else {
15+ temporary_directory = zend_strndup(sTemp, len);
16+ }
17 return temporary_directory;
18 }
19 #else
This page took 0.080139 seconds and 4 git commands to generate.