Skip Menu |
 

This queue is for tickets about the Text-BibTeX CPAN distribution.

Report information
The Basics
Id: 96593
Status: open
Priority: 0/
Queue: Text-BibTeX

People
Owner: Nobody in particular
Requestors: schwab [...] linux-m68k.org
Cc: gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Fix use of uninitialized memory
Date: Fri, 20 Jun 2014 17:15:16 +0200
To: bug-Text-BibTeX [...] rt.cpan.org
From: Andreas Schwab <schwab [...] linux-m68k.org>
Index: Text-BibTeX-0.66/btparse/src/format_name.c =================================================================== --- Text-BibTeX-0.66.orig/btparse/src/format_name.c +++ Text-BibTeX-0.66/btparse/src/format_name.c @@ -120,6 +120,8 @@ bt_create_name_format (char * parts, boo format = (bt_name_format *) malloc (sizeof (bt_name_format)); format->num_parts = num_parts; + for (i = 0; i < BT_MAX_NAMEPARTS; i++) + part_pos[i] = -2; for (i = 0; i < num_parts; i++) { switch (parts[i]) @@ -994,6 +996,11 @@ dump_format (bt_name_format * format) for (i = 0; i < BT_MAX_NAMEPARTS; i++) { + int j; + for (j = 0; j < format->num_parts; j++) + if (i == format->parts[j]) + break; + if (j == format->num_parts) continue; printf (" %-5s: pre-part=%p (%s), post-part=%p (%s)\n", nameparts[i], format->pre_part[i], format->pre_part[i], -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Download (untitled) / with headers
text/plain 1.1k
Hello, Will not have time today to look to your patch but hopefully I will merge it tomorrow if all seems well. Thank you for your help. Alberto On Fri Jun 20 11:15:31 2014, schwab@linux-m68k.org wrote: Show quoted text
> Index: Text-BibTeX-0.66/btparse/src/format_name.c > =================================================================== > --- Text-BibTeX-0.66.orig/btparse/src/format_name.c > +++ Text-BibTeX-0.66/btparse/src/format_name.c > @@ -120,6 +120,8 @@ bt_create_name_format (char * parts, boo > > format = (bt_name_format *) malloc (sizeof (bt_name_format)); > format->num_parts = num_parts; > + for (i = 0; i < BT_MAX_NAMEPARTS; i++) > + part_pos[i] = -2; > for (i = 0; i < num_parts; i++) > { > switch (parts[i]) > @@ -994,6 +996,11 @@ dump_format (bt_name_format * format) > > for (i = 0; i < BT_MAX_NAMEPARTS; i++) > { > + int j; > + for (j = 0; j < format->num_parts; j++) > + if (i == format->parts[j]) > + break; > + if (j == format->num_parts) continue; > printf (" %-5s: pre-part=%p (%s), post-part=%p (%s)\n", > nameparts[i], > format->pre_part[i], format->pre_part[i], >
Download (untitled) / with headers
text/plain 239b
On Fri Jun 20 11:15:31 2014, schwab@linux-m68k.org wrote: Show quoted text
> Index: Text-BibTeX-0.66/btparse/src/format_name.c
Can you tell use what problem this is designed to address? Do you have a minimal working example which demonstrates the problem?
Subject: Re: [rt.cpan.org #96593] [PATCH] Fix use of uninitialized memory
Date: Sat, 21 Jun 2014 19:41:22 +0200
To: "Philip Kime via RT" <bug-Text-BibTeX [...] rt.cpan.org>
From: Andreas Schwab <schwab [...] linux-m68k.org>
Download (untitled) / with headers
text/plain 426b
"Philip Kime via RT" <bug-Text-BibTeX@rt.cpan.org> writes: Show quoted text
> Can you tell use what problem this is designed to address? Do you have a minimal working example which demonstrates the problem?
Compile with -DDEBUG=2 and run t/nameformat.t under valgrind. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Download (untitled) / with headers
text/plain 1009b
On Sat Jun 21 12:45:27 2014, PHILKIME wrote: Show quoted text
> On Fri Jun 20 11:15:31 2014, schwab@linux-m68k.org wrote:
> > Index: Text-BibTeX-0.66/btparse/src/format_name.c
> > Can you tell use what problem this is designed to address? Do you have > a minimal working example which demonstrates the problem?
Hello, On Ubuntu, libtext-bibtex-perl now fails its testsuite without this patch applied on s390x architecture (64bit, big endian). https://launchpadlibrarian.net/291028484/buildlog_ubuntu-zesty-s390x.libtext-bibtex-perl_0.76-1build1_BUILDING.txt.gz Is the full build log. The failures are: Test Summary Report ------------------- t/nameformat.t (Wstat: 2304 Tests: 26 Failed: 9) Failed tests: 4-5, 7, 11-16 Non-zero exit status: 9 Files=12, Tests=523, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.45 cusr 0.04 csys = 0.54 CPU) Result: FAIL Failed 1/12 test programs. 9/523 subtests failed. I have applied this patch now in the Ubuntu package, and the testsuite now passes again. Regards, Dimitri.
Download (untitled) / with headers
text/plain 1.1k
On Mon Oct 31 06:33:26 2016, https://launchpad.net/~xnox wrote: Show quoted text
> On Sat Jun 21 12:45:27 2014, PHILKIME wrote:
> > On Fri Jun 20 11:15:31 2014, schwab@linux-m68k.org wrote:
> > > Index: Text-BibTeX-0.66/btparse/src/format_name.c
> > > > Can you tell use what problem this is designed to address? Do you > > have > > a minimal working example which demonstrates the problem?
> > > Hello, > > On Ubuntu, libtext-bibtex-perl now fails its testsuite without this > patch applied on s390x architecture (64bit, big endian). > > https://launchpadlibrarian.net/291028484/buildlog_ubuntu-zesty- > s390x.libtext-bibtex-perl_0.76-1build1_BUILDING.txt.gz > > Is the full build log. The failures are: > > Test Summary Report > ------------------- > t/nameformat.t (Wstat: 2304 Tests: 26 Failed: 9) > Failed tests: 4-5, 7, 11-16 > Non-zero exit status: 9 > Files=12, Tests=523, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.45 > cusr 0.04 csys = 0.54 CPU) > Result: FAIL > Failed 1/12 test programs. 9/523 subtests failed. > > I have applied this patch now in the Ubuntu package, and the testsuite > now passes again. > > Regards, > > Dimitri.
applied in git will release soon


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.