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

Re: Danger of dereferencing null pointer

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-10-12 18:34:55 CEST

On Tue, 2004-10-12 at 10:09, Dirk Hoffmann wrote:
> when I was looking at subversion/clients/cmdline/util.c to comprehend
> commit items I found the following lines of code:

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

You're right that this is bogus; however, it's also bogus because
commit_items can never be NULL (the contract for
svn_client_get_commit_log_t does not specify that commit_items may be
NULL, nor does libsvn_client ever pass a NULL commit_items argument).
So the test never succeeds. I'll fix.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 12 18:35:24 2004

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.