RetVal is in bytes, so check against MAX_PATH in bytes
[reactos.git] / reactos / lib / kernel32 / process / create.c
index 2e4423b..23fd7d1 100644 (file)
@@ -36,10 +36,14 @@ _SEH_FILTER(BaseExceptionFilter)
         }
         _SEH_HANDLE
         {
-            ExceptionDisposition = UnhandledExceptionFilter(ExceptionInfo);
         }
         _SEH_END;
     }
+    if ((ExceptionDisposition == EXCEPTION_CONTINUE_SEARCH || ExceptionDisposition == EXCEPTION_EXECUTE_HANDLER) &&
+        GlobalTopLevelExceptionFilter != UnhandledExceptionFilter)
+    {
+       ExceptionDisposition = UnhandledExceptionFilter(ExceptionInfo);
+    }
 
     return ExceptionDisposition;
 }
@@ -263,7 +267,7 @@ BasepConvertPriorityClass(IN ULONG dwCreationFlags)
     }
     else
     {
-        ReturnClass = 0 /* FIXME */;
+        ReturnClass = PROCESS_PRIORITY_CLASS_INVALID;
     }
     
     return ReturnClass;
@@ -969,7 +973,7 @@ GetAppName:
         }
                 
         /* Now check if we have a file, and if the path size is OK */
-        if (!RetVal || RetVal >= (MAX_PATH / sizeof(WCHAR)))
+        if (!RetVal || RetVal >= (MAX_PATH * sizeof(WCHAR)))
         {
             ULONG PathType;
             HANDLE hFile;