redhotpenguin / perl-Archive-Zip

Archive::Zip as seen at https://metacpan.org/pod/Archive::Zip
Other
15 stars 44 forks source link

crc32 binary try extract CRC from file names #97

Open Hubbitus opened 2 years ago

Hubbitus commented 2 years ago
$ crc32 /mnt/data/SHARED.pasha.data/WORKs/fascad.ru/Design/0_1db55_d0ef8001_orig.jpeg
4573d7ee        BAD 4573d7ee != d0ef8001

Check:

    if ( $file =~ /[^[:xdigit:]]([[:xdigit:]]{8})[^[:xdigit:]]/ ) {
    my $filenameCrc = $1;
    if ( lc($filenameCrc) eq lc($fileCrc) ) {
        print("\tOK")
    } else {
        print("\tBAD $fileCrc != $filenameCrc");
        }
    }

is buggy and should not treat single argument as file and CRC.

Please look also at stackexchange answer with details.

gregoa commented 1 year ago

Cf. also https://bugs.debian.org/1055193

redhotpenguin commented 1 year ago

I don't have the tuits to write up a solution right now, but would be happy to review/merge any GH pull requests and cut a new release.

On Wed, Nov 1, 2023 at 2:45 PM gregor herrmann @.***> wrote:

Cf. also https://bugs.debian.org/1055193

— Reply to this email directly, view it on GitHub https://github.com/redhotpenguin/perl-Archive-Zip/issues/97#issuecomment-1789735793, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAXRZLYGJHPQEKSDPLHPYDYCK7ITAVCNFSM6AAAAAAR5CA4QSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZG4ZTKNZZGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>