tony2001 Fri Jan 20 11:02:49 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/oci8 oci8_statement.c
Log:
MFH: fix #36096 (oci_result() returns garbage after oci_fetch() failed)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.368&r2=1.2027.2.369&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.368 php-src/NEWS:1.2027.2.369
--- php-src/NEWS:1.2027.2.368 Thu Jan 19 07:23:32 2006
+++ php-src/NEWS Fri Jan 20 11:02:49 2006
@@ -8,6 +8,8 @@
MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
on error. (Pierre)
+- Fixed bug #36096 (oci_result() returns garbage after oci_fetch() failed).
+ (Tony)
- Fixed bug #36071 (Engine Crash related with 'clone'). (Dmitry)
- Fixed bug #36055 (possible OCI8 crash in multithreaded environment). (Tony)
- Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values).
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.8&r2=1.7.2.9&diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.8
php-src/ext/oci8/oci8_statement.c:1.7.2.9
--- php-src/ext/oci8/oci8_statement.c:1.7.2.8 Sun Jan 1 12:50:10 2006
+++ php-src/ext/oci8/oci8_statement.c Fri Jan 20 11:02:49 2006
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_statement.c,v 1.7.2.8 2006/01/01 12:50:10 sniper Exp $ */
+/* $Id: oci8_statement.c,v 1.7.2.9 2006/01/20 11:02:49 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
@@ -165,7 +165,6 @@
/* this is exactly what we requested */
return 0;
}
-
return 1;
}
@@ -509,7 +508,7 @@
outcol->storage_size4 *= 3;
dynamic = OCI_DEFAULT;
- buf = outcol->data = (text *)
emalloc(outcol->storage_size4);
+ buf = outcol->data = (text *)
ecalloc(1, outcol->storage_size4);
break;
}
@@ -1020,6 +1019,10 @@
if (!statement) {
return NULL;
}
+
+ if (!statement->has_data) {
+ return NULL;
+ }
if (Z_TYPE_P(column_index) == IS_STRING) {
column = php_oci_statement_get_column(statement, -1,
Z_STRVAL_P(column_index), Z_STRLEN_P(column_index) TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php