summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_list.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-12-06 18:30:37 +0100
committerBob Weinand <bobwei9@hotmail.com>2016-12-06 18:30:37 +0100
commit43f88f25bbd40c350a5a255eb1ce687d70471ebc (patch)
tree24beaf09af2a89b020e3df65ee5447c4d236a856 /sapi/phpdbg/phpdbg_list.c
parent308cc2e9d4765b3fbdc89ec4479d4d229c640728 (diff)
parent7e12b5da712f603d4ff68c378c0b1f06dcc495db (diff)
downloadphp-git-43f88f25bbd40c350a5a255eb1ce687d70471ebc.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r--sapi/phpdbg/phpdbg_list.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 5755884ef6..c222972761 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -236,15 +236,16 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
phpdbg_file_source data, *dataptr;
zend_file_handle fake;
zend_op_array *ret;
- char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
+ char *filename;
uint line;
char *bufptr, *endptr;
- char resolved_path_buf[MAXPATHLEN];
if (zend_stream_fixup(file, &bufptr, &data.len) == FAILURE) {
return PHPDBG_G(compile_file)(file, type);
}
+ filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
+
data.buf = emalloc(data.len + ZEND_MMAP_AHEAD + 1);
if (data.len > 0) {
memcpy(data.buf, bufptr, data.len);
@@ -262,9 +263,6 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
fake.opened_path = file->opened_path;
*(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data;
- if (VCWD_REALPATH(filename, resolved_path_buf)) {
- filename = resolved_path_buf;
- }
for (line = 0, bufptr = data.buf - 1, endptr = data.buf + data.len; ++bufptr < endptr;) {
if (*bufptr == '\n') {
@@ -324,6 +322,8 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) {
return NULL;
}
+ filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
+
dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename));
ZEND_ASSERT(dataptr != NULL);