- Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
- Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
+- Fixed bug #30658 (Ensure that temporary files created by GD are removed).
+ (Ilia)
- Fixed bug #30613 (Prevent infinite recursion in url redirection). (Ilia)
- Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
- Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
int b;
FILE *tmp;
char buf[4096];
+ char *path;
- tmp = php_open_temporary_file("", "", NULL TSRMLS_CC);
+ tmp = php_open_temporary_file("", "", &path TSRMLS_CC);
if (tmp == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
RETURN_FALSE;
}
fclose(tmp);
- /* the temporary file is automatically deleted */
+ VCWD_UNLINK((const char *)path); /* make sure that the temporary file is removed */
+ efree(path);
}
RETURN_TRUE;
}