[Mimedefang] Please try attached patch

Zhang Lin-bo zlb at lsec.cc.ac.cn
Thu Apr 25 20:04:22 EDT 2002


I got the same error using the patch attached in the message
of David, but the patch downloaded from the MIMEDefang site
worked. It seems the former missed the line 'Only in ...'

On Thu, 25 Apr 2002, Albert E. Whale wrote:

> David,
>
> I attempted the patch against a Fresh MIME-tools 5.411a distribution.
 Got
> the following error:
>
> patch -p0 <New-Mimepatch.txt
> (Stripping trailing CRs from patch.)
> patching file MIME-tools-5.411/lib/MIME/Field/ParamVal.pm
> Hunk #2 FAILED at 203.
> 1 out of 2 hunks FAILED -- saving rejects to file
> MIME-tools-5.411/lib/MIME/Field/ParamVal.pm.rej
> (Stripping trailing CRs from patch.)
> patching file MIME-tools-5.411/lib/MIME/Parser.pm
> Hunk #1 FAILED at 998.
> 1 out of 1 hunk FAILED -- saving rejects to file
> MIME-tools-5.411/lib/MIME/Parser.pm.rej
>
> Any suggestion?
>
> "David F. Skoll" wrote:
>
> > Hi,
> >
> > Please try the patch below against a pristine MIME-tools 5.411a.  It
should
> > take care of even weird things like name=@ 21.pif
> >
> > Regards,
> >
> > David.
> >
> > diff -u -r MIME-tools-5.411-ORIG/lib/MIME/Field/ParamVal.pm MIME-tools-5.411/lib/MIME/Field/ParamVal.pm
> > --- MIME-tools-5.411-ORIG/lib/MIME/Field/ParamVal.pm    Sat Nov  4 14:54:49
> 2000
> > +++ MIME-tools-5.411/lib/MIME/Field/ParamVal.pm Wed Apr 24 18:41:35
2002
> > @@ -108,6 +108,9 @@
> >  # Pattern to match spaces or comments:
> >  my $SPCZ     = '(?:\s|\([^\)]*\))*';
> >
> > +# Pattern to match non-semicolon as fallback for broken MIME
> > +# produced by some viruses
> > +my $BADTOKEN = '[^;]+';
> >
> >  #------------------------------
> >  #
> > @@ -200,9 +203,16 @@
> >         $raw =~ m/\G$SPCZ\;$SPCZ/og or last;             # skip leading
> separator
> >         $raw =~ m/\G($PARAMNAME)\s*=\s*/og or last;      # give up if
> not a param
> >         $param = lc($1);
> > -       $raw =~ m/\G(\"([^\"]+)\")|\G($TOKEN)|\G($ENCTOKEN)/g or last;
>   # give up if no value
> > -       my ($qstr, $str, $token, $enctoken) = ($1, $2, $3, $4);
> > -       $params{$param} = defined($qstr) ? $str : (defined($token) ?
$token
> : $enctoken);
> > +       $raw =~ m/\G(\"([^\"]+)\")|\G($ENCTOKEN)|\G($BADTOKEN)|\G($TOKEN)/g
> or last;   # give up if no value
> > +       my ($qstr, $str, $enctoken, $badtoken, $token) = ($1, $2, $3,
> $4, $5);
> > +       if (defined($badtoken)) {
> > +           # Strip leading/trailing whitespace from badtoken
> > +           $badtoken =~ s/^\s*//;
> > +           $badtoken =~ s/\s*$//;
> > +       }
> > +       $params{$param} = defined($qstr) ? $str :
> > +           (defined($enctoken) ? $enctoken :
> > +            (defined($badtoken) ? $badtoken : $token));
> >         debug "   field param <$param> = <$params{$param}>";
> >      }
> >
> > Only in MIME-tools-5.411/lib/MIME/Field: ParamVal.pm~
> > diff -u -r MIME-tools-5.411-ORIG/lib/MIME/Parser.pm MIME-tools-5.411/lib/MIME/Parser.pm
> > --- MIME-tools-5.411-ORIG/lib/MIME/Parser.pm    Sun Nov 12 00:55:11
2000
> > +++ MIME-tools-5.411/lib/MIME/Parser.pm Wed Apr 24 08:34:18 2002
> > @@ -998,6 +998,7 @@
> >         $self->process_multipart($in, $rdr, $ent);
> >      }
> >      elsif (("$type/$subtype" eq "message/rfc822") &&
> > +          ($head->count('MIME-Version') > 0 || $self->extract_nested_messages
> eq 'REPLACE') &&
> >            $self->extract_nested_messages) {
> >         $self->debug("attempting to process a nested message");
> >         $self->process_message($in, $rdr, $ent);
> >
> > _______________________________________________
> > MIMEDefang mailing list
> > MIMEDefang at lists.roaringpenguin.com
> > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
> --
> Albert E. Whale - CISSP
> http://www.abs-comptech.com
> ----------------------------------------------------------------------
> ABS Computer Technology, Inc. - ESM, Computer & Networking Specialists
> Sr. Security, Network, and Systems Consultant
>
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>

--






More information about the MIMEDefang mailing list