This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/numeric.xs: Fix uninit error
authorKarl Williamson <khw@cpan.org>
Tue, 11 Apr 2017 17:11:24 +0000 (11:11 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 1 Jun 2017 13:05:15 +0000 (07:05 -0600)
valgrind shows that a variable could be used unininitialized.

ext/XS-APItest/APItest.pm
ext/XS-APItest/numeric.xs

index 1be0116..a5dd133 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use Carp;
 
-our $VERSION = '0.88';
+our $VERSION = '0.89';
 
 require XSLoader;
 
index 0ce9e08..fac81ba 100644 (file)
@@ -40,7 +40,7 @@ grok_atoUV(number, endsv)
        const char *pv = SvPV(number, len);
        UV value = 0xdeadbeef;
        bool result;
-       const char* endptr;
+       const char* endptr = NULL;
     PPCODE:
        EXTEND(SP,2);
        if (endsv == &PL_sv_undef) {