[Mimedefang] tripping up in percent_decode ()

Royce Williams royce.williams at acsalaska.net
Wed Jun 15 18:03:56 EDT 2005


Getting some stderr output after a new install:

mimedefang-multiplexor[1129]: Slave 0 stderr:
Use of uninitialized value in substitution (s///) at /usr/local/bin/mimedefang.pl line 349.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mimedefang.pl line 487

Line 349 is the line beginning with $str below:

sub percent_encode ($) {
     my($str) = @_;
     $str =~ s/([^\x21-\x7e]|[%\\'"])/sprintf("%%%02X", unpack("C", $1))/ge;
     #" Fix emacs highlighting...
     return $str;
}


Line 487 is the print statement below:

sub write_result_line3 ($$$$) {
     my($cmd, $arg1, $arg2, $arg3) = @_;
     $arg1 = percent_encode($arg1);
     $arg2 = percent_encode($arg2);
     $arg3 = percent_encode($arg3);
     print RESULTS "$cmd$arg1 $arg2 $arg3\n" or die("Could not write RESULTS line: $!");
}


It looks as though the substitution in percent_encode is failing, and
the /e syntax may not be happy about that?  I'm not enough of a Perl
person to be able to tell, and I haven't been able to track down to
anything borked on my side yet.

I'm running FreeBSD 5.3 and the following from the ports tree:

clamav-0.85.1
mimedefang-2.52
p5-File-Scan-1.43
p5-MIME-Base64-3.05
p5-MIME-Tools-5.417,2
p5-Mail-SpamAssassin-3.0.4
p5-Net-DNS-0.51
sendmail+tls+sasl2+ldap-8.13.4

-royce
-- 
------------------------------------------------------------------------
Royce D. Williams                                    IP Engineering, ACS
work: [first.last]@acsalaska.net                  PGP: 3FC087DB/1776A531
personal: [first]@alaska.net                 http://www.tycho.org/royce/



More information about the MIMEDefang mailing list