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

Re: svn commit: r1404159 - /subversion/trunk/subversion/libsvn_subr/named_atomic.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 31 Oct 2012 15:02:20 +0000

stefan2_at_apache.org writes:

> Author: stefan2
> Date: Wed Oct 31 14:19:59 2012
> New Revision: 1404159
>
> URL: http://svn.apache.org/viewvc?rev=1404159&view=rev
> Log:
> "Harden" our named atomics against data file corruption. Even if
> the memory block contains completely random data, we shall never
> see an access outside that buffer.

> + /* Sanitize (in case of data corruption)
> + */
> + if (new_ns->data->count > MAX_ATOMIC_COUNT)
> + new_ns->data->count = MAX_ATOMIC_COUNT;

I'm still seeing a crash:

467 if (new_ns->data->count > MAX_ATOMIC_COUNT)
(gdb) p new_ns->data->count
$1 = -1382404098

I suppose we could either test "count < 0" or make count unsigned?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2012-10-31 16:02:58 CET

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.