projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11613a1
)
Fix: A buf == NULL on filehandle will segfault
author
Bob Weinand
<bobwei9@hotmail.com>
Mon, 27 Jul 2015 14:56:54 +0000
(16:56 +0200)
committer
Bob Weinand
<bobwei9@hotmail.com>
Mon, 27 Jul 2015 14:57:09 +0000
(16:57 +0200)
sapi/phpdbg/phpdbg_list.c
patch
|
blob
|
history
diff --git
a/sapi/phpdbg/phpdbg_list.c
b/sapi/phpdbg/phpdbg_list.c
index 3d64c8b0770d0f09ab783d05d60e28c671a1e42a..89e352a97148f08215181b11ec04ff42219e4db7 100644
(file)
--- a/
sapi/phpdbg/phpdbg_list.c
+++ b/
sapi/phpdbg/phpdbg_list.c
@@
-244,12
+244,11
@@
zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
return NULL;
}
- data.buf =
NULL
;
+ data.buf =
emalloc(data.len + 1)
;
if (data.len > 0) {
- data.buf = emalloc(data.len + 1);
memcpy(data.buf, bufptr, data.len);
- data.buf[data.len] = 0;
}
+ data.buf[data.len] = 0;
data.filename = filename;
data.line[0] = 0;