https://git.reactos.org/?p=reactos.git;a=commitdiff;h=909f50a857559ce3c69f1c...
commit 909f50a857559ce3c69f1cc50d5b864357aec9c9 Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Mon May 11 20:52:30 2020 +0200 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Mon May 11 20:52:30 2020 +0200
[FONTVIEW] Ensure the extension filter is properly double-null terminated --- base/applications/fontview/fontview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/base/applications/fontview/fontview.c b/base/applications/fontview/fontview.c index df5056f4b5d..8ef2a7cb98b 100644 --- a/base/applications/fontview/fontview.c +++ b/base/applications/fontview/fontview.c @@ -126,10 +126,10 @@ wWinMain(HINSTANCE hThisInstance, if (argc < 2) { OPENFILENAMEW fontOpen; - WCHAR filter[MAX_PATH*2], dialogTitle[MAX_PATH]; + WCHAR filter[MAX_PATH*2] = {0}, dialogTitle[MAX_PATH];
LoadStringW(NULL, IDS_OPEN, dialogTitle, ARRAYSIZE(dialogTitle)); - LoadStringW(NULL, IDS_FILTER_LIST, filter, ARRAYSIZE(filter)); + LoadStringW(NULL, IDS_FILTER_LIST, filter, ARRAYSIZE(filter) - 1);
/* Clears out any values of fontOpen before we use it */ ZeroMemory(&fontOpen, sizeof(fontOpen));