summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-09-22 23:25:02 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-22 23:25:02 +0000
commit9ec3348ad1197752cfc299568cf84ab0e3b73793 (patch)
tree475215358e0668ae16cab75f76660322433bfdd9 /win32/perlhost.h
parentb85d93de80777e72578287d135fa7522521da8e8 (diff)
downloadperl-9ec3348ad1197752cfc299568cf84ab0e3b73793.tar.gz
Integrate change #12146 from maintperl;
win32_chdir() et al don't handle a NULL argument gracefully p4raw-link: @12146 on //depot/maint-5.6/perl: 4e267243e0f1e4a79c99c8aa048aeec9c0d5cd6f p4raw-id: //depot/perl@12147 p4raw-integrated: from //depot/maint-5.6/perl@12144 'merge in' win32/perlhost.h (@11401..) win32/win32.c (@12026..)
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index a417f6651e..17146016c7 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -2368,6 +2368,10 @@ CPerlHost::Chdir(const char *dirname)
{
dTHX;
int ret;
+ if (!dirname) {
+ errno = ENOENT;
+ return -1;
+ }
if (USING_WIDE()) {
WCHAR wBuffer[MAX_PATH];
A2WHELPER(dirname, wBuffer, sizeof(wBuffer));