Skip to content
Snippets Groups Projects
Commit 020b6e09 authored by eric pouech's avatar eric pouech Committed by Alexandre Julliard
Browse files

winedump: Fix out of bounds access (spotted by GCC13).


Anyway, it's a pain that we have to maintain two MS symbols
demanglers (this one and the one in dlls/msvcrt).

Signed-off-by: default avatarEric Pouech <epouech@codeweavers.com>
parent 9015565a
No related branches found
No related tags found
No related merge requests found
......@@ -573,10 +573,10 @@ static char *demangle_datatype (char **str, compound_type *ct,
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
/* Referring back to previously parsed type */
if (sym->argc >= (size_t)('0' - *iter))
if (sym->argc >= (size_t)(*iter - '0'))
return NULL;
ct->dest_type = sym->arg_type ['0' - *iter];
ct->expression = xstrdup (sym->arg_text ['0' - *iter]);
ct->dest_type = sym->arg_type [*iter - '0'];
ct->expression = xstrdup (sym->arg_text [*iter - '0']);
iter++;
break;
default :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment