From 19e368a616b673a7f5a8c7bb7f9a2f68aaf7e3dc Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 15 Dec 2010 20:03:43 +0000 Subject: [PATCH] [RTL] - Roel Messiant: Specify proper byte length of a unicode string. Fixes out of bounds access in actctx.c support code. No more half-cut active context stuff in debug logs. svn path=/trunk/; revision=50031 --- reactos/lib/rtl/actctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/rtl/actctx.c b/reactos/lib/rtl/actctx.c index 40883a8ff22..eb07758c8cf 100644 --- a/reactos/lib/rtl/actctx.c +++ b/reactos/lib/rtl/actctx.c @@ -239,7 +239,7 @@ static UNICODE_STRING xmlstr2unicode(const xmlstr_t *xmlstr) UNICODE_STRING res; res.Buffer = (PWSTR)xmlstr->ptr; - res.Length = res.MaximumLength = xmlstr->len; + res.Length = res.MaximumLength = xmlstr->len * sizeof(WCHAR); return res; }