This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Possible undefined behaviour, spotted by gcc 4.5.0 and HP's updated compiler.
authorNicholas Clark <nick@ccl4.org>
Mon, 19 Apr 2010 14:35:59 +0000 (15:35 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Apr 2010 14:35:59 +0000 (15:35 +0100)
perlio.c

index ddcc357..d015b58 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -4110,7 +4110,7 @@ PerlIOBuf_get_base(pTHX_ PerlIO *f)
     if (!b->buf) {
        if (!b->bufsiz)
            b->bufsiz = 4096;
-       b->buf = Newxz(b->buf,b->bufsiz, STDCHAR);
+       Newxz(b->buf,b->bufsiz, STDCHAR);
        if (!b->buf) {
            b->buf = (STDCHAR *) & b->oneword;
            b->bufsiz = sizeof(b->oneword);