dbghelp: Avoid accessing a negative string index when parsing stabs entries with an empty string.

This commit is contained in:
Robert Shearman 2006-07-17 12:10:04 +01:00 committed by Alexandre Julliard
parent 4a95b6ae0a
commit f9053b91bf
1 changed files with 1 additions and 1 deletions

View File

@ -1213,7 +1213,7 @@ BOOL stabs_parse(struct module* module, unsigned long load_offset,
WARN("Bad stabs string %p\n", ptr); WARN("Bad stabs string %p\n", ptr);
continue; continue;
} }
if (ptr[strlen(ptr) - 1] == '\\') if (*ptr != '\0' && (ptr[strlen(ptr) - 1] == '\\'))
{ {
/* /*
* Indicates continuation. Append this to the buffer, and go onto the * Indicates continuation. Append this to the buffer, and go onto the