summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2009-10-29 21:30:02 +0100
committerGisle Aas <gisle@aas.no>2009-10-29 21:30:02 +0100
commit3c9465285f823f6b117f10189230291c75f08e05 (patch)
tree58a04a809a9c4641586f41c689fe74ce840c4887 /pp_sys.c
parent13f4e2ac11fc84c6dd0c9663e51e31a68e57ae37 (diff)
downloadperl-3c9465285f823f6b117f10189230291c75f08e05.tar.gz
Allow syswrite with offset same as length of string [perl #70095]
You are not really outside of the string then, but the effect will always be a noop since the number of bytes written will be capped to not exceed the length of the string as for other offsets.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d3430d1c0f..015fcdf4a6 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1918,7 +1918,7 @@ PP(pp_send)
DIE(aTHX_ "Offset outside string");
}
offset += blen_chars;
- } else if (offset >= (IV)blen_chars) {
+ } else if (offset > (IV)blen_chars) {
Safefree(tmpbuf);
DIE(aTHX_ "Offset outside string");
}