diff options
author | Casey West <casey@geeknest.com> | 2003-11-03 05:11:43 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-11-03 20:00:07 +0000 |
commit | 7f6e23a86c35581b9f224abd034c75f59268efcf (patch) | |
tree | 0bc01c2dbf1ca3636d7aed07a0d94adc76bcc06f | |
parent | b3b3b51f2aca280525d4cb829ec224645bf84b5a (diff) | |
download | perl-7f6e23a86c35581b9f224abd034c75f59268efcf.tar.gz |
Cwd.xs: off-by-one buffer overflow in realpath()
Message-ID: <20031103151143.GB430@geeknest.com>
p4raw-id: //depot/perl@21646
-rw-r--r-- | ext/Cwd/Cwd.xs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs index 3f7b93b231..4600fefb11 100644 --- a/ext/Cwd/Cwd.xs +++ b/ext/Cwd/Cwd.xs @@ -166,7 +166,7 @@ loop: rootd = 0; if (*wbuf) { - if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) { + if (strlen(resolved) + strlen(wbuf) + (1 - rootd) + 1 > MAXPATHLEN) { errno = ENAMETOOLONG; goto err1; } |