From 6100a0a495d0f5504fc134f242a1ebed97a87087 Mon Sep 17 00:00:00 2001 From: chromatic Date: Mon, 27 Jul 2009 14:44:15 +0200 Subject: [PATCH] syswrite prints garbage if called with empty scalar and non-zero offset --- pp_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp_sys.c b/pp_sys.c index 23f79ba..ec12cd4 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1919,7 +1919,7 @@ PP(pp_send) DIE(aTHX_ "Offset outside string"); } offset += blen_chars; - } else if (offset >= (IV)blen_chars && blen_chars > 0) { + } else if (offset >= (IV)blen_chars) { Safefree(tmpbuf); DIE(aTHX_ "Offset outside string"); } -- 2.7.4