Advertisement
Guest User

phpdbg stack based buffer overflow

a guest
Oct 25th, 2014
1,554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1.         char *line_pos = strrchr(str, ':');
  2.  
  3.         if (line_pos && phpdbg_is_numeric(line_pos+1)) {
  4.             if (strchr(str, ':') == line_pos) {
  5.                 char path[MAXPATHLEN];
  6.  
  7.                 memcpy(path, str, line_pos - str);
  8.                 path[line_pos - str] = 0;
  9.                 *line_pos = 0;
  10.                 param->file.name = phpdbg_resolve_path(path TSRMLS_CC);
  11.                 param->file.line = strtol(line_pos+1, NULL, 0);
  12.                 param->type = FILE_PARAM;
  13.  
  14.                 goto parsed;
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement