Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Derick Rethans authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  xdebug_handler_dbgp.c
2  xdebug_handler_dbgp.c
@@ -798,7 +798,7 @@ static int check_evaled_code(function_stack_entry *fse, char **filename, int *li
798 798
 	filename_to_use = use_fse ? fse->filename : *filename;
799 799
 
800 800
 	end_marker = filename_to_use + strlen(filename_to_use) - strlen("eval()'d code");
801  
-	if (strcmp("eval()'d code", end_marker) == 0) {
  801
+	if (end_marker >= filename_to_use && strcmp("eval()'d code", end_marker) == 0) {
802 802
 		if (xdebug_hash_find(XG(context).eval_id_lookup, filename_to_use, strlen(filename_to_use), (void *) &ei)) {
803 803
 			*filename = xdebug_sprintf("dbgp://%lu", ei->id);
804 804
 		}

0 notes on commit 1b20663

Please sign in to comment.
Something went wrong with that request. Please try again.