Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

This isn't so much a question as to provide others with an answer/solution. RT didn't work for me today for Mail::ClamAV and "Meditations" didn't feel like the right place to post this.

Mail::ClamAV has a long standing bug with checking the version of the installed clamav binary. The bug is in how the version strings are compared.

I wrote a patch to fix this (needs another pair of eyes, though), here it is:

diff -ur Mail-ClamAV-0.29-0/ClamAV.pm Mail-ClamAV-0.30-0/ClamAV.pm --- Mail-ClamAV-0.29-0/ClamAV.pm 2019-01-30 14:10:41.676672369 +010 +0 +++ Mail-ClamAV-0.30-0/ClamAV.pm 2019-01-30 14:12:55.505658002 +010 +0 @@ -7,7 +7,7 @@ our $VERSION; BEGIN { - $VERSION = '0.29'; + $VERSION = '0.30'; } # guard against memory errors not being reported Only in Mail-ClamAV-0.30-0: config.pl diff -ur Mail-ClamAV-0.29-0/Makefile.PL Mail-ClamAV-0.30-0/Makefile.PL --- Mail-ClamAV-0.29-0/Makefile.PL 2019-01-30 14:10:41.680672399 +0 +100 +++ Mail-ClamAV-0.30-0/Makefile.PL 2019-01-30 14:25:22.283191107 +0 +100 @@ -51,7 +51,12 @@ } my $clver = get_cl_version(); - return warn_cl_version_bad() if $clver lt $minclversion; + + my ($thismajor, $thisminor, $thispatch) = split/\./, $clver; + my ($minmajor, $minminor, $minpatch) = split/\./, $minclversion; + if($thismajor < $minmajor || ($thismajor == $minmajor && $thismin +or < $minmajor) || (thismajor == $minmajor && $thisminor == $minminor + && $thispatch < $minpatch)) { + return warn_cl_version_bad($clver); + } my $inc = get_cl_inc_paths(); my $libs = get_cl_libs(); @@ -87,7 +92,8 @@ } sub warn_cl_version_bad { - warn "The clamav version you are using is too old. Please upgrade + to at least $minclversion\n"; + my $clver = shift; + warn "The clamav version ($clver) you are using is too old. Pleas +e upgrade to at least $minclversion\n"; return 0; } diff -ur Mail-ClamAV-0.29-0/META.yml Mail-ClamAV-0.30-0/META.yml --- Mail-ClamAV-0.29-0/META.yml 2019-01-30 14:10:41.680672399 +0100 +++ Mail-ClamAV-0.30-0/META.yml 2019-01-30 14:12:42.761564062 +0100 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Mail-ClamAV -version: 0.29 +version: 0.30 abstract: Perl extension for the clamav virus scanner license: ~ author: @@ -11,7 +11,7 @@ provides: Mail::ClamAV: file: ClamAV.pm - version: 0.29 + version: 0.30 no_index: directory: - Inline

Note: I contacted the maintainer of the package. But i'm not too hopeful, last update of Mail::ClamAV was 2009.

perl -e 'use MIME::Base64; print decode_base64("4pmsIE5ldmVyIGdvbm5hIGdpdmUgeW91IHVwCiAgTmV2ZXIgZ29ubmEgbGV0IHlvdSBkb3duLi4uIOKZqwo=");'

In reply to Patch for Mail::ClamAV (modern clamav versions) by cavac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found