logo       

Re: ClamAV infinite loop: msg#00031

security.virus.clamav.devel

Subject: Re: ClamAV infinite loop

On Sun, Nov 27, 2005 at 02:03:59PM +0000, 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 bytes. Please report to
> bugs@xxxxxxxxxx\n", size);
> return NULL;
> }
>
> Looks like a failure to me!

That only fails if the size parmaeter is NULL or too big. If they are of
normal size it succeeds, and continues to the next bit where it allocates
memory and returns, and then the calling function continues on until it
fails and loops again. The question is really, why does the calling
function loop if the first time failed? Shouldn't it return an error?
--
--------------------------------------------------------------------------
| Stephen Gran | I want to marry a girl just like the |
| steve@xxxxxxxxxxx | girl that married dear old dad. -- |
| http://www.lobefin.net/~steve | Freud |
--------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise