From 262d32634b33d85e978a66e87f43d6d12df9e23c Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Wed, 22 Jul 2015 00:02:40 +0200 Subject: [PATCH] Undefined values may lead to big allocation --- sapi/phpdbg/phpdbg_list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 38804d551e..7b1bc8783b 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -240,7 +240,9 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { char *bufptr, *endptr; char resolved_path_buf[MAXPATHLEN]; - zend_stream_fixup(file, &data.buf, &data.len); + if (zend_stream_fixup(file, &data.buf, &data.len) == FAILURE) { + return NULL; + } data.filename = filename; data.line[0] = 0; -- 2.40.0