summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-18 16:33:01 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-18 16:33:01 +0000
commit00db4c452819e776e72467584ab4e9617d012f7b (patch)
treea0211b478efd413d7b381a4a612d15e1a33036d8 /doio.c
parent3b818b81e61465ce5ae6f7c21e6ca3b83d30216e (diff)
downloadperl-00db4c452819e776e72467584ab4e9617d012f7b.tar.gz
fix memory leaks and uninitialized memory accesses found by Purify
p4raw-id: //depot/perl@1143
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index 9d841a195c..ff8384c331 100644
--- a/doio.c
+++ b/doio.c
@@ -258,7 +258,7 @@ do_open(GV *gv, register char *name, I32 len, int as_raw, int rawmode, int rawpe
else
fp = PerlIO_open(name,mode);
}
- else if (name[len-1] == '|') {
+ else if (len > 1 && name[len-1] == '|') {
name[--len] = '\0';
while (len && isSPACE(name[len-1]))
name[--len] = '\0';