apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viipuri, Timo" <timo.viip...@f-secure.com>
Subject [PATCH] NULL checking in apr_bucket_alloc() and socket_bucket_read()
Date Thu, 07 Jul 2005 08:42:20 GMT
Hi,

We have had some problems with APR-util crashing in apr_bucket_alloc() under
low memory circumstances. The problem has been the calls to
apr_allocator_alloc() returning NULL if it can't allocate memory. Currently,
the return value is not checked for NULL and the program crashes.

I suggest the following two simple patches to solve this problem. If NULL is
returned by one of the calls to apr_allocator_alloc() the function
socket_bucket_read() will return with error condition: APR_ENOMEM.

What do you think?

 Timo

Mime
View raw message