[PATCH 0/1] MR7330: msi: Avoid invalid access when handling format strings.
From: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/msi/format.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/msi/format.c b/dlls/msi/format.c index 5301752a41a..0daebece21e 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -739,7 +739,13 @@ static BOOL verify_format(LPWSTR data) while (*data) { - if (*data == '[' && *(data - 1) != '\\') + if (*data == '\\' && *(data + 1) == '[') + { + data += 2; + continue; + } + + if (*data == '[') count++; else if (*data == ']') count--; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7330
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7330
participants (3)
-
Hans Leidekker (@hans) -
Nikolay Sivov -
Nikolay Sivov (@nsivov)