Michael Stefaniuc : wscript: Zero terminate the host version string to avoid random garbage.

Alexandre Julliard julliard at winehq.org
Wed Nov 4 15:20:31 CST 2020


Module: wine
Branch: master
Commit: 7f955f289ac68ef49e73eaa4a8d8f12168f47785
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7f955f289ac68ef49e73eaa4a8d8f12168f47785

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue Nov  3 23:34:34 2020 +0100

wscript: Zero terminate the host version string to avoid random garbage.

String is used only once and passed to SysAllocString() which assumes a
zero terminated string.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/wscript/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/wscript/host.c b/programs/wscript/host.c
index 9541994d3b0..ba3a32a935d 100644
--- a/programs/wscript/host.c
+++ b/programs/wscript/host.c
@@ -33,7 +33,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(wscript);
 
 #define BUILDVERSION 16535
-static const WCHAR wshVersionW[] = {'5','.','8'};
+static const WCHAR wshVersionW[] = L"5.8";
 
 VARIANT_BOOL wshInteractive =
 #ifndef CSCRIPT_BUILD




More information about the wine-cvs mailing list