cvs: php4 /ext/oci8/ oci8.c

From: Date: Tue, 30 May 2000 09:25:02 +0000
Subject: cvs: php4 /ext/oci8/ oci8.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-15929@lists.php.net to get a copy of this message
thies Tue May 30 02:25:02 2000 EDT Modified files: /php4/ext/oci8 oci8.c Log: @- fixed crash in OCIParse when parsing invalid SQL. (Thies) Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.84 php4/ext/oci8/oci8.c:1.85 --- php4/ext/oci8/oci8.c:1.84 Thu May 25 00:44:45 2000 +++ php4/ext/oci8/oci8.c Tue May 30 02:25:02 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.84 2000/05/25 07:44:45 thies Exp $ */ +/* $Id: oci8.c,v 1.85 2000/05/30 09:25:02 thies Exp $ */ /* TODO list: * @@ -1098,7 +1098,9 @@ OCI_NTV_SYNTAX, OCI_DEFAULT)); if (connection->error) { - /* XXX loose memory */ + OCIHandleFree(statement->pStmt, OCI_HTYPE_STMT); + OCIHandleFree(statement->pError, OCI_HTYPE_ERROR); + efree(statement); return 0; } } @@ -3680,7 +3682,11 @@ statement = oci_parse(connection,(*query)->value.str.val,(*query)->value.str.len); - RETURN_RESOURCE(statement->id); + if (statement) { + RETURN_RESOURCE(statement->id); + } else { + RETURN_FALSE; + } } /* }}} */

« previous php.version4 (#15929) next »