Re: [Clamav-devel] ClamAV infinite loop

2005-11-28 Thread Nigel Horne
Stephen Gran wrote: On Sun, Nov 27, 2005 at 02:03:59PM +, Nigel Horne said: On Wed, 2005-11-16 at 21:41, Brian Bebeau wrote: cli_realloc() doesn't fail, so it never breaks out of the loop from that. From cli_realloc: if(!size || size MAX_ALLOCATION) { cli_errmsg(Attempt

Re: [Clamav-devel] ClamAV infinite loop

2005-11-28 Thread Nigel Horne
Try this patch in .../clamav-devel/libclamav: *** Oothers.c 2005-11-28 09:01:06.0 + --- others.c2005-11-28 09:02:03.0 + *** *** 354,360 cli_errmsg(cli_realloc(): Can't re-allocate memory to %d byte.\n, size);

Re: [Clamav-devel] ClamAV infinite loop

2005-11-28 Thread Trog
On Mon, 2005-11-28 at 09:03 +, Nigel Horne wrote: Try this patch in .../clamav-devel/libclamav: ! if(alloc == ptr) { ! cli_errmsg(cli_realloc(): Can't re-allocate memory to %u bytes\n, size); ! free(ptr); ! return NULL; ! } You seriously don't want to do

Re: [Clamav-devel] ClamAV infinite loop

2005-11-27 Thread Stephen Gran
On Sun, Nov 27, 2005 at 02:03:59PM +, Nigel Horne said: On Wed, 2005-11-16 at 21:41, Brian Bebeau wrote: cli_realloc() doesn't fail, so it never breaks out of the loop from that. From cli_realloc: if(!size || size MAX_ALLOCATION) { cli_errmsg(Attempt to allocate %d