[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed 15 May 2002 at 09:05:32 +0300, Richard Braakman wrote:
> On Tue, May 14, 2002 at 08:41:11PM -0700, Luca Filipozzi wrote:
> > > Or tried to feed a .bz2 from 2 gigabytes of zeroes through an amavis
> > > with an unpacking partition of 150MB.
> > 
> > That's interesting.  Good thing I limit mail messages to 10MB with the
> > MTA, I guess.
> That might not help.  Gigabytes of zeroes compress really well :)
> The actual .bz2 file can be under your 10MB limit, and still fill up
> any partition you try to unpack it in.  So the virus scanner needs
> to be smart enough to deal with this.

For example:

    $ cat /dev/zero | head -c 2147483647 | bzip2 -9 | wc -c

For decompressors which can operate in a pipe (like bzip2, gzip), is
there anything much wrong with doing the decompressing something like

    $ cat $TMPFILE | bzcat | head -c $SIZELIMIT > $TMPFILEOUT

?  Of course it will corrupt (by truncating) attachments which are zipped
files of zeros, but is that a problem?

Tim Bell - bhat@trinity.unimelb.edu.au - System Administrator & Programmer
    Trinity College, Royal Parade, Parkville, Victoria, 3052, Australia

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: