www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: mod_proxy and HTTP 302 response
Date Wed, 21 Aug 2002 07:25:41 GMT
Brett Hutley wrote:

> Kinda works like strdup() as far as I can see... (although I guess with 
> a memory pool)...

>    len = strlen(s) + 1;
>    res = apr_palloc(a, len);
>    memcpy(res, s, len);

The apr_palloc() will either allocate enough memory for a (potentially 
very large) string, or it will segfault (to my knowledge) and fail safe. 
Thus the memcpy will only occur if a buffer is created sufficiently 
large enough to hold the string, thus no overflow that I can see.

Again - can someone else check...?

	"There's a moon
					over Bourbon Street

View raw message