Subject: | Segmentation fault when in-memory file handle is used |
Test Perl code:
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use Image::ValidJpeg;
my $url = 'http://...';
my $ua = LWP::UserAgent->new(agent => '');
my $request = HTTP::Request->new(GET => $url);
my $response = $ua->request($request);
if (($response->is_success) &&
($response->code == 200) &&
($response->header('Content-Type') eq 'image/jpeg'))
{
my $content = $response->decoded_content;
open(my $img, '<', \$content);
my $check = Image::ValidJpeg::check_all($img);
print "$check\n";
}