summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-20 05:23:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-20 05:23:15 +0000
commit4ecd490ccf7bf09140e24e001c5acc2d417d685c (patch)
treec43dc9282d0b378beb87dc2a0ad71b929d40c9f6 /win32/win32.c
parent7f274f0f6c9842ea688f851b8245ef7d42203120 (diff)
downloadperl-4ecd490ccf7bf09140e24e001c5acc2d417d685c.tar.gz
Integrate:
[ 19033] file test operators weren't doing the right thing if the SV passed to them wasn't NUL-terminated [ 19034] ensure SVs returned by Win32::Get{Short,Full}PathName() are NUL-terminated p4raw-link: @19034 on //depot/maint-5.6/perl: d453a28c5f70420dd114c2f0f61ec1aaf34109e0 p4raw-link: @19033 on //depot/maint-5.6/perl: 1ad7974d3a92321c870ce2bd5ce4e57098b51c10 p4raw-id: //depot/perl@19036 p4raw-integrated: from //depot/maint-5.6/perl@19028 'merge in' doio.c (@16333..) win32/win32.c (@18377..)
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 070ee9c132..87665ff372 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4647,6 +4647,7 @@ XS(w32_GetShortPathName)
} while (len >= SvLEN(shortpath) && sv_grow(shortpath,len+1));
if (len) {
SvCUR_set(shortpath,len);
+ *SvEND(shortpath) = '\0';
ST(0) = shortpath;
XSRETURN(1);
}
@@ -4690,6 +4691,7 @@ XS(w32_GetFullPathName)
items = 2;
}
SvCUR_set(fullpath,len);
+ *SvEND(fullpath) = '\0';
ST(0) = fullpath;
XSRETURN(items);
}