summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2000-08-18 09:31:48 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-19 14:08:01 +0000
commite8d3aa3b2e7edcd352aa3e0d8a884844f9aa9d5e (patch)
tree9ada5768549e3cd327da242adeaf3b9f899e7ee9 /win32
parent1e6dc0b685b17e94025b09758a184a17aee43b32 (diff)
downloadperl-e8d3aa3b2e7edcd352aa3e0d8a884844f9aa9d5e.tar.gz
fix for Win32::GetFullPathName and Win32::GetShortPathName
Message-ID: <2ihrps00u6qkpjtfq6f2b1d1ndkrs7l04u@4ax.com> p4raw-id: //depot/perl@6710
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 914ebfd78f..f0f629e0ec 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3927,6 +3927,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),
@@ -3956,6 +3959,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),