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

Re: SVN_PROP_MAX_SIZE (was: Re: svn commit: r1028092 - /subversion/branches/performance/subversion/libsvn_ra_svn/marshal.c)

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 28 Oct 2010 16:28:11 +0200

On Thu, Oct 28, 2010 at 02:35:49PM +0100, Julian Foad wrote:
> On Thu, 2010-10-28 at 14:22 +0200, Stefan Sperling wrote:
> > Can we define a constant like SVN_PROP_MAX_SIZE that says how large
> > a property can be? This would be useful in the patch code, for instance.
> > Right now, a patch with a large property value will cause out of memory
> > errors because the code has no way of knowing the maximum size of a
> > property value -- so it just keeps reading and allocating.
> >
> > Also, do we have a plan for what to do when (not "if") mergeinfo in
> > repositories out there hits the limit?
>
> Hi Stefan. I thought the issue being addressed here was not imposing a
> limit on property size, but rather just limiting the allocation of an
> initial chunk of memory which can still be expanded later if the claimed
> amount of data actually arrives.
>
> "We should not use large strings in our protocol. However, we may
> receive a claim that a very long string is going to follow. In that
> case, we start small and wait for all that data to actually show up.
> This does not fully prevent DOS attacs but makes them harder (you have
> to actually send gigabytes of data)."
>
> "Don't allocate the whole buffer at once ..."

Ah, I misunderstood. Thanks!

Stefan
Received on 2010-10-28 16:28:53 CEST

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.