Commit 020b6e09 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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: 's avatarEric Pouech <epouech@codeweavers.com>
parent 9015565a
......@@ -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 :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment