[ros-diffs] [pschweitzer] 49659: [NTOSKRNL] Fix potential buffer overflow

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Sat Nov 20 12:07:24 UTC 2010


Author: pschweitzer
Date: Sat Nov 20 12:07:24 2010
New Revision: 49659

URL: http://svn.reactos.org/svn/reactos?rev=49659&view=rev
Log:
[NTOSKRNL]
Fix potential buffer overflow

Modified:
    trunk/reactos/ntoskrnl/ke/freeldr.c

Modified: trunk/reactos/ntoskrnl/ke/freeldr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=49659&r1=49658&r2=49659&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Sat Nov 20 12:07:24 2010
@@ -1206,14 +1206,10 @@
                               0,
                               &Base);
     
-    //
-    // Check if we have a ramdisk
-    //
+    /* Check if we have a ramdisk */
     if ((RosLoaderBlock->RdAddr) && (RosLoaderBlock->RdLength))
     {
-        //
-        // Build a descriptor for it
-        //
+        /* Build a descriptor for it */
         KiRosAllocateNtDescriptor(LoaderXIPRom,
                                   KERNEL_DESCRIPTOR_PAGE(RosLoaderBlock->RdAddr),
                                   (RosLoaderBlock->RdLength + PAGE_SIZE - 1) >> PAGE_SHIFT,
@@ -1267,7 +1263,7 @@
     HalPath = strchr(BootPath + 1, ' ');
     *HalPath = ANSI_NULL;
     BldrNtBootPath[0] = '\\';
-    strncat(BldrNtBootPath, BootPath + 1, 63);
+    strncat(BldrNtBootPath, BootPath + 1, 61);
     strcat(BldrNtBootPath,"\\");
     LoaderBlock->NtBootPathName = BldrNtBootPath;
 




More information about the Ros-diffs mailing list