com php-src: Fix bug #70861 Segmentation fault in pdo_parse _params() during Drupal 8 test suite: ext /pdo/pdo_sql_parser.c

From: Date: Thu, 05 Nov 2015 13:46:28 +0000
Subject: com php-src: Fix bug #70861 Segmentation fault in pdo_parse _params() during Drupal 8 test suite: ext /pdo/pdo_sql_parser.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89596@lists.php.net to get a copy of this message
Commit: 5c96a91d77727a7af5604cd9be29a53e3afa2619 Author: Anatol Belski <ab@php.net> Thu, 5 Nov 2015 14:35:41 +0100 Parents: 9968129831ab0eaf92841336dc1bd6049f711d4a Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5c96a91d77727a7af5604cd9be29a53e3afa2619 Log: Fix bug #70861 Segmentation fault in pdo_parse_params() during Drupal 8 test suite Bugs: https://bugs.php..net/70861 Changed paths: M ext/pdo/pdo_sql_parser.c Diff: diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index 155ca95..0907571 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -575,6 +575,10 @@ safe: zend_string *buf; buf = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0); + if (!buf) { + ret = -1; + goto clean_up; + } if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen, param->param_type)) { /* bork */

« previous php.cvs (#89596) next »