From 94ea8b7bfad27013b3919598ba4daee97b526649 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 25 Jan 2012 22:09:49 +0000 Subject: [PATCH] - Better fix for the registry value bug introduced by Rafal. The string is guaranteed to be NULL terminated, however MaximumLength is off by one in some cases (more specifically in videoprt.c:131 two NULLs are being added by sizeof(Insert1) and sizeof(Insert2)). See issue #6838 for more details. svn path=/trunk/; revision=55184 --- reactos/drivers/video/videoprt/videoprt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/video/videoprt/videoprt.c b/reactos/drivers/video/videoprt/videoprt.c index 04d7a8c57e1..d3547ee68b0 100644 --- a/reactos/drivers/video/videoprt/videoprt.c +++ b/reactos/drivers/video/videoprt/videoprt.c @@ -492,7 +492,7 @@ IntVideoPortFindAdapter( DeviceVideoBuffer, REG_SZ, DeviceExtension->RegistryPath.Buffer, - DeviceExtension->RegistryPath.Length); + DeviceExtension->RegistryPath.Length + sizeof(UNICODE_NULL)); RtlWriteRegistryValue( RTL_REGISTRY_DEVICEMAP,