On 2018-07-10 12:26:33, STAS wrote:
Show quoted text> Hi Dave et al,
>
> I found a file on which File::LibMagic crashes, please find it here:
>
https://www.dropbox.com/s/gulodkyzbk12ve4/test.doc?dl=0
>
> % perl -le 'use File::LibMagic;
> File::LibMagic->new()->info_from_filename(shift)' test.doc
> error calling magic_file: (null) at
> /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/File/LibMagic.pm line 107.
I can reproduce this locally with info_from_filename and info_from_handle. However, info_from_string returns some info, though it doesn't seem 100% correct.
The error it's croaking with is weird. Internally it's calling magic_error() to get info on why a previous call returned NULL, but magic_error() is _also_ returning NULL, which it shouldn't do.