[ros-diffs] [fireball] 55184: - 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 i...

fireball at svn.reactos.org fireball at svn.reactos.org
Wed Jan 25 22:09:53 UTC 2012


Author: fireball
Date: Wed Jan 25 22:09:49 2012
New Revision: 55184

URL: http://svn.reactos.org/svn/reactos?rev=55184&view=rev
Log:
- 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.

Modified:
    trunk/reactos/drivers/video/videoprt/videoprt.c

Modified: trunk/reactos/drivers/video/videoprt/videoprt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/videoprt/videoprt.c?rev=55184&r1=55183&r2=55184&view=diff
==============================================================================
--- trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Wed Jan 25 22:09:49 2012
@@ -492,7 +492,7 @@
       DeviceVideoBuffer,
       REG_SZ,
       DeviceExtension->RegistryPath.Buffer,
-      DeviceExtension->RegistryPath.Length);
+      DeviceExtension->RegistryPath.Length + sizeof(UNICODE_NULL));
 
    RtlWriteRegistryValue(
        RTL_REGISTRY_DEVICEMAP,




More information about the Ros-diffs mailing list