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

Re: [Issue 639] - introduce svn_filesize_t

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-03-18 23:39:26 CET

Greg Hudson wrote:

>- assert (this_chunk->offset <= *offset);
>- *offset -= this_chunk->offset;
>+ assert (this_chunk->offset <= rep_offset);
>+ assert (rep_offset - this_chunk->offset < SVN_MAX_OBJECT_SIZE);
>+ *chunk_offset = (apr_size_t) (rep_offset - this_chunk->offset);
>
>Are both of these assertions checking things that can't happen even if
>the fs is corrupt?
>
I think we wouldn't get this far if the FS is corrupt. The only way I
can imagine this happening is if SVN_STREAM_CHUNK_SIZE >=
SVN_MAX_OBJECT_SIZE, which should never happen. I put in the second
assert as an extra check to make sure that the cast to apr_size_t
doesn't lose data.

>I didn't see any other potential problems in my read-through.
>
>
These are potential problems?

-- 
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 Tue Mar 18 23:42:07 2003

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.