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

Re: Suspicious code in SVNStatusListCtrl

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 19 Jan 2011 20:57:07 +0100

On 19.01.2011 07:38, Dmitry wrote:
> Hey.
>
> CSVNStatusListCtrl::OnLvnGetInfoTip() currently contains the
> following line of code:
>
> if (GetListEntry(pGetInfoTip->iItem>= 0))
>
> which looks suspicious. "pGetInfoTip->iItem>= 0" evaluates to either
> 0 or 1 so GetListEntry() will try to retrieve one of those entries
> and maybe will return a null pointer.
>
> Is that really what is intended here?

Good catch!
Fixed in r20740.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2699145
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-01-19 20:57:23 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.