Bug#849066: QRcode size (Version) auto-selection broken
Damyan Ivanov
dmn at debian.org
Thu Dec 22 09:51:24 UTC 2016
Package: libgd-barcode-perl
Version: 1.15-5
Severity: important
Tags: upstream patch
Control: forwarded -1 https://rt.cpan.org/Public/Bug/Display.html?id=20297
GD::Barcode::QRcode docs say:
Version
Version ie. size of barcode image (Default = auto select).
However, the following code dies:
$ perl -MGD::Barcode::QRcode -E'use warnings; binmode(STDOUT); \
GD::Barcode::QRcode->new("https://www.debian.org/")'
Overflow error. version 1
total bits: 364 max bits: 128
As noted in the upstream bug (7 years ago!), changing the initialization of
Version from
$oSelf->{Version} = $rhPrm->{Version} || 1;
to
$oSelf->{Version} = $rhPrm->{Version} || 0;
fixes the logic in _caclVersion().
I am going to apply the proposed patch and upload.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgd-barcode-perl depends on:
ii libgd-perl [libgd-gd2-perl] 2.53-3
ii perl 5.24.1~rc4-1
libgd-barcode-perl recommends no packages.
libgd-barcode-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list