[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Need help with this DAV stuff

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-11-06 21:03:58 CET

Philip Martin wrote:

>Peter Davis <peter@pdavis.cx> writes:
>
>
>
>>>I think mod_dav_svn/update.c:upd_change_xxx_prop needs to apr_pstrdup
>>>name. It calls apr_xml_quote_string but that doesn't reallocate if
>>>there is nothing to quote.
>>>
>>>
>>Not that I know shack jit about anything, but would this problem affect
>>everywhere else that apr_xml_quote_string is used as well?
>>
>>
>
>No, not everywhere. It's only a problem if the memory supplied as
>input to apr_xml_quote_string gets reused before the output from
>apr_xml_quote_string is used. In this case the output was stored, and
>I suspect the pool from which the input was allocated got cleared
>before the stored value was used.
>

If apr_xml_quote_string doesn't always allocate new space for its
result, then that's either a bug in that function, _or_ it must
guarantee that the returned pointer will be the same as the one passed
in, in which case we can check that and pstrdup only when necessary. Right?

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 6 21:04:55 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.