[PATCH 0/1] MR2581: 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: Eric Pouech <epouech(a)codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2581
From: Eric Pouech <eric.pouech(a)gmail.com> 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: Eric Pouech <epouech(a)codeweavers.com> --- tools/winedump/msmangle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/winedump/msmangle.c b/tools/winedump/msmangle.c index f9440c04a45..4408e418191 100644 --- a/tools/winedump/msmangle.c +++ b/tools/winedump/msmangle.c @@ -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 : -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2581
pipeline failure (in ws2_32:afd) is not related to the patch (in tools/winedump) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2581#note_28996
participants (2)
-
Eric Pouech -
eric pouech (@epo)