Brian Bebeau wrote:
Nigel Horne wrote:
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
[EMAIL PROTECTED]", size);
return NULL;
}
Looks like a failure to me!
But cli_realloc does NOT fail. I don't get that error message.
Have you looked at your stderr?
Possibly it doesn't fail because it's not trying to alloc as
much memory. Only the cli_calloc() in messageCreate() fails,
trying to calloc 68 bytes.
Why does the loop repeat and try to do the exact same thing
when messageCreate() fails?
Have you actually looked at cli_realloc?
Here's another place it can fail, this time if the malloc of a
a small number of bytes doesn't work:
alloc = realloc(ptr, size);
if(!alloc) {
cli_errmsg("cli_realloc(): Can't re-allocate memory to %d byte.\n",
size);
perror("realloc_problem");
return NULL;
} else return alloc;
--
Nigel Horne. Arranger, Adjudicator, Band Trainer, Composer, Typesetter.
NJH Music, Barnsley, UK. ICQ#20252325
[EMAIL PROTECTED] http://www.bandsman.co.uk
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html