Bug#766357: [libnet-cups-perl] bad free() when finalizing the result of getDestinations()

Jean Privat privat.jean at uqam.ca
Wed Oct 22 13:44:34 UTC 2014


Package: libnet-cups-perl
Version: 0.61-2 b3
Severity: normal

--- Please enter the report below this line. ---

~~~sh
$ perl /usr/share/doc/libnet-cups-perl/examples/list_dests.pl
color
latece
prof
xerox
xerox
xerox
xerox2
*** Error in `perl': free(): invalid pointer: 0x00000000018aa704 ***
Abandon
~~~

The simple script  bellow shows that something fishy is going on
during the finalization of getDestinations

~~~perl
use Net::CUPS;
{
$sc = Net::CUPS->new();
my @pl = $sc->getDestinations();
print("A\n");
}
print("B\n");
~~~

When executed, it prints only A

~~~
A
*** Error in `perl': free(): invalid pointer: 0x0000000001fba634 ***
Abandon
~~~

Removing the `my` in `my @pl` force delay the error at the end of the
program. thus A and B are printed

~~~
$ perl c.pl
A
B
*** Error in `perl': free(): invalid pointer: 0x0000000002459384 ***
Abandon
~~~

Using `getDestination` (singular) does not seem to triggers the bug.

--- System information. ---
Architecture: amd64
Kernel:       Linux 3.16-3-amd64

Debian Release: jessie/sid
  990 testing         security.debian.org
  990 testing         http.debian.net
  500 unstable        http.debian.net
  500 stable          security.debian.org
  500 stable          http.debian.net
  500 stable          dl.google.com
    1 experimental    http.debian.net

--- Package information. ---
Depends                (Version) | Installed
================================- -==============
perl               (>= 5.20.0-4) | 5.20.1-1
perlapi-5.20.0                   |
libc6                   (>= 2.4) |
libcups2              (>= 1.6.0) |


Package's Recommends field is empty.

Suggests         (Version) | Installed
==========================- -===========
cups-common                | 1.7.5-4



More information about the pkg-perl-maintainers mailing list