diff -up php-5.2.17/ext/oci8/oci8.c.bug-319457 php-5.2.17/ext/oci8/oci8.c --- php-5.2.17/ext/oci8/oci8.c.bug-319457 2012-02-16 08:25:41.000000000 +0700 +++ php-5.2.17/ext/oci8/oci8.c 2012-02-16 08:26:55.000000000 +0700 @@ -1187,7 +1187,14 @@ open: connection->is_persistent = 0; } else { connection = (php_oci_connection *) calloc(1, sizeof(php_oci_connection)); + if (connection == NULL) { + return NULL; + } connection->hash_key = zend_strndup(hashed_details.c, hashed_details.len); + if (connection->hash_key == NULL) { + free(connection); + return NULL; + } connection->is_persistent = 1; } } else {