diff options
| author | Anatol Belski <ab@php.net> | 2015-11-05 14:35:41 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-11-08 04:22:18 +0100 |
| commit | 602e57e1c6c971e22b8da9d7518ead2b7f7a6f90 (patch) | |
| tree | e01134dfffc92ff501a2e9dcfa6886aebd050a08 /ext | |
| parent | 40326fef9d4bd1349010aa944ff1f5970282390b (diff) | |
| download | php-git-602e57e1c6c971e22b8da9d7518ead2b7f7a6f90.tar.gz | |
Fix bug #70861 Segmentation fault in pdo_parse_params() during Drupal 8 test suite
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/pdo/pdo_sql_parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index 155ca95c1c..0907571e08 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 */ |
