Skip Menu |

This queue is for tickets about the File-MMagic CPAN distribution.

Report information
The Basics
Id: 77836
Status: resolved
Priority: 0/
Queue: File-MMagic

People
Owner: Nobody in particular
Requestors: NMOLDAV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.28
Fixed in: (no value)



Subject: Deep recursion in checktype_contents()
checktype_contents() gets into an infinite loop by calling itself whenever the length of its $data argument is greater than zero: Deep recursion on subroutine "File::MMagic::checktype_contents" at /usr/lib/perl5/site_perl/5.8.8/File/MMagic.pm line 631. This is the file signature: # # $Id: MMagic.pm 282 2012-05-31 07:36:36Z knok $ # This is an excerpt of the guilty sub: ---- sub checktype_contents { my $self = shift; my $data = shift; my $mtype; return 'application/octet-stream' if (length($data) <= 0); $mtype = checktype_contents($self, $data); return $mtype unless $mtype eq ""; ----- You possibly meant to call checktype_container? How to replicate: use File::MMagic; my $mm = new File::MMagic; $mm->checktype_contents('a');
Fixed in 1.29. Thank you for your report.