diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pdo/pdo_sql_parser.re | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 9922e03690..96c131fe96 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -217,6 +217,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 */ |