httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1188950 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h include/httpd.h include/util_varbuf.h modules/filters/mod_substitute.c server/util.c
Date Fri, 28 Oct 2011 12:37:05 GMT

On Oct 27, 2011, at 4:21 PM, Stefan Fritsch wrote:
> 
> That's correct, it would crash if len == APR_SIZE_MAX. But my point 
> was that it would also crash for len == APR_SIZE_MAX-1000, because by 
> definition, the machine cannot have that much free mem and apr_pcalloc 
> would call abort(). So in both cases, the amount of free memory is the 
> limit. But aborting with out-of-mem is more correct than simply 
> segfaulting, therefore I have fixed it.

Worrying about what the machine would do and what the code
would do are 2 different things. The code is obviously broken
should len == APR_SIZE_MAX, no matter whether or not
the machine allows it or not, and that is, imo, unacceptable.

Mime
View raw message