Robert Shearman : dbghelp: Avoid accessing a negative string index when parsing stabs entries with an empty string .
Module: wine Branch: refs/heads/master Commit: f9053b91bfbf906d85533f2f943dfbe7b460d5f9 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f9053b91bfbf906d85533f2f... Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon Jul 17 12:10:04 2006 +0100 dbghelp: Avoid accessing a negative string index when parsing stabs entries with an empty string. --- dlls/dbghelp/stabs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c index e75b150..dd9a70c 100644 --- a/dlls/dbghelp/stabs.c +++ b/dlls/dbghelp/stabs.c @@ -1213,7 +1213,7 @@ BOOL stabs_parse(struct module* module, WARN("Bad stabs string %p\n", ptr); continue; } - if (ptr[strlen(ptr) - 1] == '\\') + if (*ptr != '\0' && (ptr[strlen(ptr) - 1] == '\\')) { /* * Indicates continuation. Append this to the buffer, and go onto the
participants (1)
-
Alexandre Julliard