Subject: | segfault in net-cups (double free) |
Date: | Fri, 23 Nov 2007 11:57:19 +0100 |
To: | bug-Net-CUPS [...] rt.cpan.org |
From: | Tomas Vanderka <tomas_vanderka [...] tempest.sk> |
Hi, there's a segv caused by requestData. The problem is that functions
cups*Request() free the request (kind of stupid, but it's how cups api
does it).
Sample code to reproduce:
#!/usr/bin/perl
use Net::CUPS;
use Net::CUPS::IPP;
my $cups = Net::CUPS->new();
my $request = Net::CUPS::IPP->new(CUPS_GET_PRINTERS);
my $response = $cups->requestData($request, "/");
# the pointer in $request is now freed, causes segv in
IPP->DESTROY->freeIPP->ippDelete