summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-21 21:38:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-21 21:38:38 +0000
commite0ac4f5fe723dae5ff9e639384ba416597f0f300 (patch)
tree1a093fbd13b05ae8058088389f6b3e7414fd40b9 /util.c
parent62e06c6283f9b55d708fe714971a4425de79a9fb (diff)
downloadperl-e0ac4f5fe723dae5ff9e639384ba416597f0f300.tar.gz
Off-by-one. I'm so classic.
p4raw-id: //depot/perl@10801
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index d0d8454b86..feef339893 100644
--- a/util.c
+++ b/util.c
@@ -3616,7 +3616,7 @@ Perl_sv_getcwd(pTHX_ register SV *sv)
SvPOK_off(sv);
New(0, buf, MAXPATHLEN, char);
if (buf) {
- buf[MAXPATHLEN] = 0;
+ buf[MAXPATHLEN - 1] = 0;
/* Yes, some getcwd()s automatically allocate a buffer
* if given a NULL one. Portability is the problem.
* XXX Configure probe needed. */