Bug 1152739

Summary: value "0" parsed as empty string when value is part of shared string table
Product: [Fedora] Fedora Reporter: David Mansfield <bugzilla>
Component: perl-Spreadsheet-XLSXAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-Spreadsheet-XLSX-0.13-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-28 06:33:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xlsx file which demonstrates the bug none

Description David Mansfield 2014-10-14 20:17:29 UTC
Created attachment 947033 [details]
xlsx file which demonstrates the bug

Description of problem:
If a cell contains the text value "0" (without quotes), and that value gets saved in the shared string table, parsing will return empty value instead of the digit 0.

Version-Release number of selected component (if applicable):
perl-Spreadsheet-XLSX-0.13-5.fc20.noarch

How reproducible:
Always

Steps to Reproduce:
1. See attached XLSX file.
2.
3.

Actual results:
Parsing produces cell value of empty string

Expected results:
Parsing produces cell value of digit 0 (ie. "0")


Additional info:
This bug was introduced by the patch "perl-Spreadsheet-XLSX-0.13-warnings.patch" that is added into the Fedora version of the package.

In that patch, a CPAN bug is referenced (https://rt.cpan.org/Public/Bug/Display.html?id=84528) however the implementation in the RPM differs from the one in the bug report in one critical aspect (which causes the bug):

Line 49 in patch from RPM:
   $str .= $t if $t;

Line 49 from CPAN bug report;
   $str .= $t if defined($t);

In this case $t = "0", so it is false, but is defined.

I have verified that changing line 49 from ... if ($t) to .. if defined($t) fixes the issue.

Comment 1 Fedora Update System 2014-10-14 21:33:57 UTC
perl-Spreadsheet-XLSX-0.13-8.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.fc21

Comment 2 Fedora Update System 2014-10-14 21:34:16 UTC
perl-Spreadsheet-XLSX-0.13-8.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.fc20

Comment 3 Fedora Update System 2014-10-14 21:34:33 UTC
perl-Spreadsheet-XLSX-0.13-8.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.fc19

Comment 4 Fedora Update System 2014-10-14 21:34:49 UTC
perl-Spreadsheet-XLSX-0.13-8.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.el6

Comment 5 Fedora Update System 2014-10-14 21:35:03 UTC
perl-Spreadsheet-XLSX-0.13-8.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.el5

Comment 6 Fedora Update System 2014-10-16 17:19:50 UTC
Package perl-Spreadsheet-XLSX-0.13-8.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-Spreadsheet-XLSX-0.13-8.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12966/perl-Spreadsheet-XLSX-0.13-8.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-10-27 23:17:01 UTC
perl-Spreadsheet-XLSX-0.13-8.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/perl-Spreadsheet-XLSX-0.13-8.el7

Comment 8 Fedora Update System 2014-10-28 06:33:46 UTC
perl-Spreadsheet-XLSX-0.13-8.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-10-28 06:38:05 UTC
perl-Spreadsheet-XLSX-0.13-8.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-11-01 16:51:16 UTC
perl-Spreadsheet-XLSX-0.13-8.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-11-01 22:35:05 UTC
perl-Spreadsheet-XLSX-0.13-8.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-11-01 22:35:13 UTC
perl-Spreadsheet-XLSX-0.13-8.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2014-11-12 23:14:48 UTC
perl-Spreadsheet-XLSX-0.13-8.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.