summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2005-12-28 10:57:46 +0000
committerGisle Aas <gisle@activestate.com>2005-12-28 10:57:46 +0000
commitad07e1310bf8286a17223f4f5f7abcb6926d9c81 (patch)
treeca409c05cce3e9cf1aa1bd0bc4a70d3ec5673f5c /ext
parent6a288e044b9e7ec704a0ff87485b0c15610869fd (diff)
downloadperl-ad07e1310bf8286a17223f4f5f7abcb6926d9c81.tar.gz
Fix 2 off-by-one errors in the call to ninstr().
This code managed to still work because of a bug in how ninstr() treats empty search strings. p4raw-id: //depot/perl@26509
Diffstat (limited to 'ext')
-rw-r--r--ext/Filter/Util/Call/Call.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Filter/Util/Call/Call.xs b/ext/Filter/Util/Call/Call.xs
index 05fe95fbfe..f3344dcc60 100644
--- a/ext/Filter/Util/Call/Call.xs
+++ b/ext/Filter/Util/Call/Call.xs
@@ -85,7 +85,7 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen)
}
else {
/* want lines */
- if ((p = ninstr(out_ptr, out_ptr + n - 1, nl, nl))) {
+ if ((p = ninstr(out_ptr, out_ptr + n, nl, nl + 1))) {
sv_catpvn(buf_sv, out_ptr, p - out_ptr + 1);