File: fix-leak-and-possible-crash-introduced-by-the-null-poisoning-patch.patch

package info (click to toggle)
php5 5.3.3-7%2Bsqueeze19
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 122,836 kB
  • ctags: 55,742
  • sloc: ansic: 633,963; php: 19,620; sh: 11,344; xml: 5,816; cpp: 2,400; yacc: 1,745; exp: 1,514; makefile: 1,019; pascal: 623; awk: 537; sql: 22
file content (61 lines) | stat: -rw-r--r-- 1,623 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -1641,8 +1641,10 @@ PHP_FUNCTION(sqlite_open)
 	}
 
 	if (strlen(filename) != filename_len) {
+		zend_restore_error_handling(&error_handling TSRMLS_CC);
 		RETURN_FALSE;
 	}
+
 	if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
 		/* resolve the fully-qualified path name to use as the hash key */
 		if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
@@ -1697,6 +1699,7 @@ PHP_FUNCTION(sqlite_factory)
 	}
 
 	if (strlen(filename) != filename_len) {
+		zend_restore_error_handling(&error_handling TSRMLS_CC);
 		RETURN_FALSE;
 	}
 
--- /dev/null
+++ b/ext/soap/tests/error_handler.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #46760 (SoapClient doRequest fails when proxy is used)
+--SKIPIF--
+<?php require_once('skipif.inc'); 
+if (!extension_loaded('sqlite')) die('skip squilite extension not available');
+?>
+--FILE--
+<?php
+echo "blllllllllaaaaaaa\n";
+$var475 = sqlite_factory("\x00");
+$var147 = use_soap_error_handler();
+$var477 = flock(false,false);dump($client->_proxy_port);
+
+echo "OK";
+?>
+--EXPECT--
+OK
--- a/ext/xsl/xsltprocessor.c
+++ b/ext/xsl/xsltprocessor.c
@@ -643,6 +643,7 @@ PHP_FUNCTION(xsl_xsltprocessor_transform
 	ret = -1;
 	if (newdocp) {
 		if (strlen(uri) != uri_len) {
+			xmlFreeDoc(newdocp);
 			RETURN_FALSE;
 		}
 		ret = xsltSaveResultToFilename(uri, newdocp, sheetp, 0);
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -403,6 +403,7 @@ static PHP_FUNCTION(pspell_new_personal)
 #endif
 
 	if (strlen(personal) != personal_len) {
+		delete_pspell_config(config);
 		RETURN_FALSE;
 	}