Skip to content

Commit 3c5a3e7

Browse files
committed
Fixed incomplete initialization.
1 parent 41de89f commit 3c5a3e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/phpdbg/phpdbg_list.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void phpdbg_list_function_byname(const char *str, size_t len) /* {{{ */
234234

235235
zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
236236
phpdbg_file_source data, *dataptr;
237-
zend_file_handle fake = {{0}};
237+
zend_file_handle fake;
238238
zend_op_array *ret;
239239
char *filename = (char *)(file->opened_path ? ZSTR_VAL(file->opened_path) : file->filename);
240240
uint line;
@@ -253,11 +253,11 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
253253
data.filename = filename;
254254
data.line[0] = 0;
255255

256+
memset(&fake, 0, sizeof(fake));
256257
fake.type = ZEND_HANDLE_MAPPED;
257258
fake.handle.stream.mmap.buf = data.buf;
258259
fake.handle.stream.mmap.len = data.len;
259260
fake.free_filename = 0;
260-
fake.opened_path = file->opened_path;
261261
fake.filename = filename;
262262
fake.opened_path = file->opened_path;
263263

0 commit comments

Comments
 (0)