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

Re: svn commit: r1166247 - in /subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs: fs.h fs_fs.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 7 Sep 2011 21:42:41 +0200

On Wed, Sep 07, 2011 at 06:43:01PM +0200, Stefan Sperling wrote:
> On Wed, Sep 07, 2011 at 07:31:05PM +0300, Daniel Shahaf wrote:
> > On Wednesday, September 07, 2011 4:16 PM, stsp_at_apache.org wrote:
> > > + /* Create successor-ID data for revision zero. */
> > > SVN_ERR(svn_io_file_open(&file, path_successor_ids(fs, 0, pool),
> > > APR_WRITE | APR_BUFFERED | APR_CREATE,
> > > APR_OS_DEFAULT, pool));
> > > + /* Write the new index. */
> > > + memset(new_index, 0, sizeof(new_index));
> > > + n = (apr_int32_t*)&new_index[3];
> > > + *n = htonl(FSFS_SUCCESSORS_INDEX_SIZE);
> >
> > That doesn't look right. You're assuming this trick sets new_index[0..3], but can't it set new_index[3..7]?
>
> This code must set new_index[3..7].

As discussed on IRC, I had an off-by-one -- it must be [4..7].
This bug should have been fixed, among others, in r1166335. Thanks!
Received on 2011-09-07 21:43:19 CEST

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