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

Re: valgrind warning in BDB locks code

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Sat, 26 Nov 2011 09:16:47 -0500

On 11/24/2011 12:02 PM, Philip Martin wrote:
> then I reach this bit of code:
>
> 261 while ((! db_err)
> (gdb) n
> 262 && strncmp(lookup_path, key.data, strlen(lookup_path)) == 0)
> (gdb) p lookup_path
> $1 = 0x7470d0 "/A/D/H/ABCDEFGHIJKLMNOPQR/"
> (gdb) p key
> $2 = {data = 0x746bd0, size = 10, ulen = 0, dlen = 0, doff = 0,
> app_data = 0x0, flags = 16}
> (gdb) p (char*)key.data
> $3 = 0x746bd0 "/A/D/H/chi\354\366\377\177"
>
> and passing that key.data to strncmp, with n>key.size, looks like an
> error. So I believe the first fix alone is not enough.

+1

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-11-26 15:17:31 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.