develooper Front page | perl.dbi.dev | Postings from July 2019

[perl5-dbi/dbi] b5a144: Fix calling newSV() in malloc_using_sv()

From:
Tim Bunce
Date:
July 27, 2019 04:36
Subject:
[perl5-dbi/dbi] b5a144: Fix calling newSV() in malloc_using_sv()
Message ID:
perl5-dbi/dbi/push/refs/heads/master/a9d94f-abbcc3@github.com
  Branch: refs/heads/master
  Home:   https://github.com/perl5-dbi/dbi
  Commit: b5a1440f0352ccf36dbad791389ad65b2d1ce64c
      https://github.com/perl5-dbi/dbi/commit/b5a1440f0352ccf36dbad791389ad65b2d1ce64c
  Author: Pali <pali@cpan.org>
  Date:   2019-07-25 (Thu, 25 Jul 2019)

  Changed paths:
    M DBI.xs

  Log Message:
  -----------
  Fix calling newSV() in malloc_using_sv()

newSV(0) returns undef, scalar without PV slot. newSV(len) for len > 0
returns scalar with len+1 bytes in PV slot.

This change fixes calling malloc_using_sv(0) which may happen by calling
savepv_using_sv("").


  Commit: abbcc3bcb649173ede8e1d407e852d7d51ce9e6e
      https://github.com/perl5-dbi/dbi/commit/abbcc3bcb649173ede8e1d407e852d7d51ce9e6e
  Author: Tim Bunce <Tim.Bunce@pobox.com>
  Date:   2019-07-26 (Fri, 26 Jul 2019)

  Changed paths:
    M DBI.xs

  Log Message:
  -----------
  Merge pull request #81 from pali/newSV

Fix calling newSV() in malloc_using_sv()


Compare: https://github.com/perl5-dbi/dbi/compare/a9d94f68fa17...abbcc3bcb649



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About