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: Sun, 08 Nov 2015 03:22:18 +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-89694@lists.php.net to get a copy of this message
Commit: 602e57e1c6c971e22b8da9d7518ead2b7f7a6f90 Author: Anatol Belski <ab@php.net> Thu, 5 Nov 2015 14:35:41 +0100 Parents: 40326fef9d4bd1349010aa944ff1f5970282390b Branches: PHP-7.0.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=602e57e1c6c971e22b8da9d7518ead2b7f7a6f90 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 (#89694) next »