[ros-diffs] [hyperion] 33635: Patch by Alex Ionescu <alex.ionescu at reactos.org> See issue #3116 for more details.

hyperion at svn.reactos.org hyperion at svn.reactos.org
Thu May 22 15:19:33 CEST 2008


Author: hyperion
Date: Thu May 22 08:19:32 2008
New Revision: 33635

URL: http://svn.reactos.org/svn/reactos?rev=33635&view=rev
Log:
Patch by Alex Ionescu <alex.ionescu at reactos.org>

See issue #3116 for more details.

Modified:
    trunk/reactos/ntoskrnl/mm/procsup.c

Modified: trunk/reactos/ntoskrnl/mm/procsup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/procsup.c?rev=33635&r1=33634&r2=33635&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] Thu May 22 08:19:32 2008
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
- * FILE:            ntoskrnl/mm/process.c
+ * FILE:            ntoskrnl/mm/procsup.c
  * PURPOSE:         Memory functions related to Processes
  *
  * PROGRAMMERS:     Alex Ionescu (alex at relsoft.net)
@@ -615,20 +615,24 @@
         /* Determine the image file name and save it to EPROCESS */
         DPRINT("Getting Image name\n");
         FileName = SectionObject->FileObject->FileName;
-        szSrc = (PWCHAR)(FileName.Buffer + FileName.Length);
-        while (szSrc >= FileName.Buffer)
-        {
-            /* Make sure this isn't a backslash */
-            if (*--szSrc == OBJ_NAME_PATH_SEPARATOR)
+        szSrc = (PWCHAR)((PCHAR)FileName.Buffer + FileName.Length);
+        if (FileName.Buffer)
+        {
+            /* Loop the file name*/
+            while (szSrc > FileName.Buffer)
             {
-                /* If so, stop it here */
-                szSrc++;
-                break;
-            }
-            else
-            {
-                /* Otherwise, keep going */
-                lnFName++;
+                /* Make sure this isn't a backslash */
+                if (*--szSrc == OBJ_NAME_PATH_SEPARATOR)
+                {
+                    /* If so, stop it here */
+                    szSrc++;
+                    break;
+                }
+                else
+                {
+                    /* Otherwise, keep going */
+                    lnFName++;
+                }
             }
         }
 
@@ -720,3 +724,4 @@
    DPRINT("Finished MmReleaseMmInfo()\n");
    return(STATUS_SUCCESS);
 }
+



More information about the Ros-diffs mailing list