You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dirk Hoffmann <dh...@web.de> on 2004/10/12 10:11:59 UTC

Dereferencing of null pointer possible?

Hi,

when I was looking at subversion/clients/cmdline/util.c to understand 
commit items I found the following lines of code:

  if (! (commit_items || commit_items->nelts))
    {
      *log_msg = "";
      return SVN_NO_ERROR;
    }

I believe the first line should be

if (!commit_items || !commit_items->nelts)

or

if (! (commit_items && commit_items->nelts) )

Otherwise if commit_item is NULL it will be dereferenced.

Regards Dirk




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org