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

Re: Patch: Certain error conditions are handled incorrectly in COM methods

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 17 Sep 2009 19:08:30 +0200

On 17.09.2009 07:40, Dmitry wrote:
> Hey.
>
> In TSVN certain error conditions in COM methods are handled incorrectly:
> 1. Sometimes no checks for null pointers are performed and those pointers are later dereferenced.
> 2. Sometimes E_INVALIDARG is returned when a pointer to an "out" parameter is null. E_POINTER should be returned instead.
> 3. Sometimes S_FALSE is returned for incorrect arguments. S_FALSE evaluates "FAILED()" macro to "false" and is a way to indicate that the call has completed successfully but either the answer to the query is "no, thank you" or the query has obtained less results than requested. Such misuse is an example of error hiding.
> 4. Sometimes an object is created with "new" and IUnknown::QueryInterface() is called in it without a check for whether that call succeeded and that can cause a memory leak.
>
> A patch is proposed.

Thanks a lot!
Committed in r17202.

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=2396116
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-09-17 19:08:36 CEST

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.