This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
syswrite prints garbage if called with empty scalar and non-zero offset
authorchromatic <chromatic@wgz.org>
Mon, 27 Jul 2009 12:44:15 +0000 (14:44 +0200)
committerVincent Pit <perl@profvince.com>
Mon, 27 Jul 2009 12:49:25 +0000 (14:49 +0200)
pp_sys.c

index 23f79ba..ec12cd4 100644 (file)
--- 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");
            }