change#6791 accidentally clobbered change#6710, put it back
Gurusamy Sarathy [Fri, 1 Sep 2000 22:16:40 +0000 (22:16 +0000)]
p4raw-link: @6791 on //depot/perl: da147683998a4de28027887441303c16367eda87
p4raw-link: @6710 on //depot/perl: e8d3aa3b2e7edcd352aa3e0d8a884844f9aa9d5e

p4raw-id: //depot/perl@6999

win32/win32.c

index 687ffe0..9fc83c1 100644 (file)
@@ -3912,6 +3912,9 @@ XS(w32_GetShortPathName)
 
     shortpath = sv_mortalcopy(ST(0));
     SvUPGRADE(shortpath, SVt_PV);
+    if (!SvPVX(shortpath) || !SvLEN(shortpath))
+        XSRETURN_UNDEF;
+
     /* src == target is allowed */
     do {
        len = GetShortPathName(SvPVX(shortpath),
@@ -3941,6 +3944,9 @@ XS(w32_GetFullPathName)
     filename = ST(0);
     fullpath = sv_mortalcopy(filename);
     SvUPGRADE(fullpath, SVt_PV);
+    if (!SvPVX(fullpath) || !SvLEN(fullpath))
+        XSRETURN_UNDEF;
+
     do {
        len = GetFullPathName(SvPVX(filename),
                              SvLEN(fullpath),