From 243f6f9cc0d1adbcfccf46be60ae48ddaf1610ec Mon Sep 17 00:00:00 2001 From: guenther Date: Mon, 14 Jul 2014 05:54:19 +0000 Subject: [PATCH] Fix an off-by-one error that's already been accepted upstream --- gnu/usr.bin/perl/x2p/str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/usr.bin/perl/x2p/str.c b/gnu/usr.bin/perl/x2p/str.c index 86127a0f3a3..e12e5e9c123 100644 --- a/gnu/usr.bin/perl/x2p/str.c +++ b/gnu/usr.bin/perl/x2p/str.c @@ -200,7 +200,7 @@ str_gets(STR *str, FILE *fp) for (;;) { while (--cnt >= 0) { if ((*bp++ = *ptr++) == newline) { - if (bp <= str->str_ptr || bp[-2] != '\\') + if (bp <= str->str_ptr + 1 || bp[-2] != '\\') goto thats_all_folks; else { line++; -- 2.20.1