On Mon, Nov 15, 2004 at 10:16:11AM +0000, Colin Watson wrote: > On Fri, Nov 12, 2004 at 09:32:25AM -0500, David F. Skoll wrote: > > This behaviour of MIME-tools (failing if an I/O operation fails) will > > *not* be changed; I've had discussions about this before. > > > > Silently permittion I/O operations to fail can be a security risk. It's > > up to users of MIME-tools to ensure that their underlying file handles > > support the flush() method correctly. > > We use variously IO::Scalar and IO::Lines, both of which have a flush() > method (the latter via IO::ScalarArray), so I'm slightly puzzled. Bill, > I don't suppose you could do me a favour and investigate with 'perl -d' > to see exactly which MIME-tools call is failing?
To summary: the short program bug.pl in attachement fail on the test email bug.mail also in attachement: %./bug.pl < bug.mail MIME::Parser: can't flush: at /usr/share/perl5/MIME/Parser.pm line 789, <> line 91. %cat bug.pl #! /usr/bin/perl -wT use strict; use MIME::Parser; use IO::Lines; my @mail=(); push @mail,$_ while(<>); my $parser = new MIME::Parser; $parser->tmp_to_core(1); $parser->output_to_core(1); my $entity = $parser->parse( new IO::Lines [EMAIL PROTECTED] ); So, is bug.pl buggy ? If yes, how should it be fixed ? Thanks, Bill.
bug.pl
Description: Perl program
Received: (at 89) by pari.math.u-bordeaux.fr; 7 Nov 2004 18:27:00 +0000
From [EMAIL PROTECTED] Sun Nov 07 19:27:00 2004
Received: from lns-p19-5-82-65-20-77.adsl.proxad.net
([82.65.20.77] helo=yellowpig.yi.org ident=mail)
by pari with esmtp (Exim 3.35 #1 (Debian))
id 1CQrki-0007fy-00
for <[EMAIL PROTECTED]>; Sun, 07 Nov 2004 19:27:00 +0100
Received: from bill by yellowpig.yi.org with local (Exim 3.35 #1 (Debian))
id 1CQrkf-0005uB-00; Sun, 07 Nov 2004 19:26:57 +0100
Date: Sun, 7 Nov 2004 19:26:57 +0100
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Bug#89: galoisinit() bug
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="kkcDP0v44wDpNmbp"
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Mutt/1.3.28i
From: Bill Allombert <[EMAIL PROTECTED]>
--kkcDP0v44wDpNmbp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Oct 12, 2004 at 08:25:37PM -0400, Igor Schein wrote:
> Package: pari
> Version: 2.2.8 (development CHANGES-1.1028)
>
> I just wanted to enter this previously known bug into the database for
> accounting purposes:
>
> ? galoisinit(x^4+272*x^3+40256*x^2+1740800*x+25397248)
> *** galoisinit: prime too small in fixedfield.
> ? galoisinit(x^4+884*x^3-1972*x^2-884*x+1)
> *** galoisinit: prime too small in fixedfield.
Hello Igor,
after some investigations I found that:
1) There was a bug in the symmetric polynomials search algorithm.
(It discarded some useful polynomials).
2) Karim convinced me that the problem does have a solution and
give an algorithm to compute it.
3) Given the bug 1) a lot of code has an uselessly complicated
interface.
The attached patch fix 1) and fix your two examples above.
I plan to fix 3) and implement a variant of Karim algorithm
later on.
I will let Karim decide whether this patch should be applied before
2.2.8 is released.
Cheers,
Bill
--kkcDP0v44wDpNmbp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: src/basemath/galconj.c
===================================================================
RCS file: /home/cvs/pari/src/basemath/galconj.c,v
retrieving revision 1.146
diff -u -r1.146 galconj.c
--- src/basemath/galconj.c 1 Nov 2004 17:39:41 -0000 1.146
+++ src/basemath/galconj.c 7 Nov 2004 18:15:18 -0000
@@ -1314,14 +1314,8 @@
deg[i]=0;
for(n=1,i=1;i<lg(L);i++)
{
- long j;
LN[n]=(long)fixedfieldnewtonsum(O,Ll,l,stoi(i));
- for(j=2;j<lg(LN[n]);j++)
- if(cmpii(gmael(LN,n,j),gmael(LN,n,1)))
- break;
- if(j==lg(LN[n]) && j>2)
- continue;
- if (DEBUGLEVEL>=6) fprintferr("FixedField: LN[%d]=%Z\n",n,LN[n]);
+ if (DEBUGLEVEL>=6) fprintferr("FixedField: LN[%d]^%d=%Z \n",n,i,LN[n]);
deg[n]=i;
if (fixedfieldtests(LN,n))
{
--kkcDP0v44wDpNmbp--

