Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a memory checking issue if the filename was shorter than the "e…

…val'ed code" string.

Just found this while trying to find the bug in issue #860.
  • Loading branch information...
commit 1b20663eec6d2405d5cea7268280becf69a63510 1 parent d9e85ce
@derickr authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  xdebug_handler_dbgp.c
View
2  xdebug_handler_dbgp.c
@@ -798,7 +798,7 @@ static int check_evaled_code(function_stack_entry *fse, char **filename, int *li
filename_to_use = use_fse ? fse->filename : *filename;
end_marker = filename_to_use + strlen(filename_to_use) - strlen("eval()'d code");
- if (strcmp("eval()'d code", end_marker) == 0) {
+ if (end_marker >= filename_to_use && strcmp("eval()'d code", end_marker) == 0) {
if (xdebug_hash_find(XG(context).eval_id_lookup, filename_to_use, strlen(filename_to_use), (void *) &ei)) {
*filename = xdebug_sprintf("dbgp://%lu", ei->id);
}
Please sign in to comment.
Something went wrong with that request. Please try again.