Bug#847278: libdata-uuid-libuuid-perl: new_uuid() returns uninitialized memory for version 1

Niko Tyni ntyni at debian.org
Tue Dec 6 21:26:10 UTC 2016


Package: libdata-uuid-libuuid-perl
Version: 0.05-2
Severity: important
Tags: patch
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=119149

Running t/basic.t under valgrind shows uses of uninitialized values,
as seen below. This seems to be due to a typo in new_uuid(): there's a
'ggdefault' label, which should presumably be the 'default' case for
switch.

Proposed patch attached. 

  1..50
  ok 1 - use Data::UUID::LibUUID;
  ok 2 - new_uuid_string
  ==25364== Use of uninitialised value of size 8
  ==25364==    at 0x55A0121: _itoa_word (_itoa.c:180)
  ==25364==    by 0x55A4889: vfprintf (vfprintf.c:1636)
  ==25364==    by 0x565286B: __vsprintf_chk (vsprintf_chk.c:83)
  ==25364==    by 0x56527BC: __sprintf_chk (sprintf_chk.c:31)
  ==25364==    by 0x775E722: sprintf (stdio2.h:33)
  ==25364==    by 0x775E722: uuid_unparse_x (unparse.c:56)
  ==25364==    by 0x7559874: XS_Data__UUID__LibUUID_new_uuid_string (LibUUID.xs:223)
  ==25364==    by 0x1DC0AF: Perl_pp_entersub (pp_hot.c:3987)
  ==25364==    by 0x1D45D5: Perl_runops_standard (run.c:41)
  ==25364==    by 0x15A6E8: S_run_body (perl.c:2488)
  ==25364==    by 0x15A6E8: perl_run (perl.c:2411)
  ==25364==    by 0x13385C: main (perlmain.c:116)
  ==25364== 
  ==25364== Conditional jump or move depends on uninitialised value(s)
  ==25364==    at 0x55A0128: _itoa_word (_itoa.c:180)
  ==25364==    by 0x55A4889: vfprintf (vfprintf.c:1636)
  ==25364==    by 0x565286B: __vsprintf_chk (vsprintf_chk.c:83)
  ==25364==    by 0x56527BC: __sprintf_chk (sprintf_chk.c:31)
  ==25364==    by 0x775E722: sprintf (stdio2.h:33)
  ==25364==    by 0x775E722: uuid_unparse_x (unparse.c:56)
  ==25364==    by 0x7559874: XS_Data__UUID__LibUUID_new_uuid_string (LibUUID.xs:223)
  ==25364==    by 0x1DC0AF: Perl_pp_entersub (pp_hot.c:3987)
  ==25364==    by 0x1D45D5: Perl_runops_standard (run.c:41)
  ==25364==    by 0x15A6E8: S_run_body (perl.c:2488)
  ==25364==    by 0x15A6E8: perl_run (perl.c:2411)
  ==25364==    by 0x13385C: main (perlmain.c:116)
  ==25364== 
  ==25364== Conditional jump or move depends on uninitialised value(s)
  ==25364==    at 0x55A4991: vfprintf (vfprintf.c:1636)
  ==25364==    by 0x565286B: __vsprintf_chk (vsprintf_chk.c:83)
  ==25364==    by 0x56527BC: __sprintf_chk (sprintf_chk.c:31)
  ==25364==    by 0x775E722: sprintf (stdio2.h:33)
  ==25364==    by 0x775E722: uuid_unparse_x (unparse.c:56)
  ==25364==    by 0x7559874: XS_Data__UUID__LibUUID_new_uuid_string (LibUUID.xs:223)
  ==25364==    by 0x1DC0AF: Perl_pp_entersub (pp_hot.c:3987)
  ==25364==    by 0x1D45D5: Perl_runops_standard (run.c:41)
  ==25364==    by 0x15A6E8: S_run_body (perl.c:2488)
  ==25364==    by 0x15A6E8: perl_run (perl.c:2411)
  ==25364==    by 0x13385C: main (perlmain.c:116)
  ==25364== 
  ==25364== Conditional jump or move depends on uninitialised value(s)
  ==25364==    at 0x55A3851: vfprintf (vfprintf.c:1636)
  ==25364==    by 0x565286B: __vsprintf_chk (vsprintf_chk.c:83)
  ==25364==    by 0x56527BC: __sprintf_chk (sprintf_chk.c:31)
  ==25364==    by 0x775E722: sprintf (stdio2.h:33)
  ==25364==    by 0x775E722: uuid_unparse_x (unparse.c:56)
  ==25364==    by 0x7559874: XS_Data__UUID__LibUUID_new_uuid_string (LibUUID.xs:223)
  ==25364==    by 0x1DC0AF: Perl_pp_entersub (pp_hot.c:3987)
  ==25364==    by 0x1D45D5: Perl_runops_standard (run.c:41)
  ==25364==    by 0x15A6E8: S_run_body (perl.c:2488)
  ==25364==    by 0x15A6E8: perl_run (perl.c:2411)
  ==25364==    by 0x13385C: main (perlmain.c:116)
  ==25364== 
  ==25364== Conditional jump or move depends on uninitialised value(s)
  ==25364==    at 0x55A38D2: vfprintf (vfprintf.c:1636)
  ==25364==    by 0x565286B: __vsprintf_chk (vsprintf_chk.c:83)
  ==25364==    by 0x56527BC: __sprintf_chk (sprintf_chk.c:31)
  ==25364==    by 0x775E722: sprintf (stdio2.h:33)
  ==25364==    by 0x775E722: uuid_unparse_x (unparse.c:56)
  ==25364==    by 0x7559874: XS_Data__UUID__LibUUID_new_uuid_string (LibUUID.xs:223)
  ==25364==    by 0x1DC0AF: Perl_pp_entersub (pp_hot.c:3987)
  ==25364==    by 0x1D45D5: Perl_runops_standard (run.c:41)
  ==25364==    by 0x15A6E8: S_run_body (perl.c:2488)
  ==25364==    by 0x15A6E8: perl_run (perl.c:2411)
  ==25364==    by 0x13385C: main (perlmain.c:116)
  ==25364== 
  ok 3 - new_uuid_string(1)
 
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list