[ros-bugs] [Bug 679] New: GetFullPathName doesn't return empty string if given pathname is empty string

ReactOS.Bugzilla at reactos.com ReactOS.Bugzilla at reactos.com
Tue Jul 19 00:37:28 CEST 2005


http://reactos.com/bugzilla/show_bug.cgi?id=679

           Summary: GetFullPathName doesn't return empty string if given
                    pathname is empty string
           Product: ReactOS
           Version: 0.3.0-SVN
          Platform: x86 Hardware
        OS/Version: ReactOS
            Status: NEW
          Severity: trivial
          Priority: P3
         Component: Win32
        AssignedTo: ros-bugs at reactos.com
        ReportedBy: jjkola at email.com


If given an empty string as path to GetFullPathName it should return empty 
string as full path name but it returns full path name unmodified. Here is a 
patch for it (lib/ntdll/rtl/path.c):

Index: path.c
===================================================================
--- path.c	(revision 16631)
+++ path.c	(working copy)
@@ -690,7 +690,11 @@
 
     DPRINT("RtlGetFullPathName_U(%S %lu %p %p)\n", name, size, buffer, 
file_part);
 
-    if (!name || !*name) return 0;
+    if (!name || !*name)
+    {
+        if (buffer) *buffer = '\0';
+        return 0;
+    }
 
     if (file_part) *file_part = NULL;

-- 
Configure bugmail: http://reactos.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ros-bugs mailing list