Skip to content

Commit

Permalink
Fixed uninitalized memory issue. ->filename isn't there when the type…
Browse files Browse the repository at this point in the history
… is not EXTERNAL
  • Loading branch information
derickr committed Sep 19, 2015
1 parent 433770e commit 49ed8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdebug_stack.c
Expand Up @@ -1294,7 +1294,7 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
if (!tmp->filename) {
/* Includes/main script etc */
#if PHP_VERSION_ID >= 70000
tmp->filename = (op_array && op_array->filename && type == XDEBUG_EXTERNAL) ? xdstrdup(op_array->filename->val): NULL;
tmp->filename = (type == XDEBUG_EXTERNAL && op_array && op_array->filename) ? xdstrdup(op_array->filename->val): NULL;
#else
tmp->filename = (op_array && op_array->filename) ? xdstrdup(op_array->filename): NULL;
#endif
Expand Down

0 comments on commit 49ed8ac

Please sign in to comment.