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

Re: svn commit: r32702 - trunk/subversion/libsvn_subr

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Wed, 27 Aug 2008 14:45:59 -0400

hwright_at_tigris.org writes:
> Log:
> If parsing a NULL pointer into a checksum, don't crash, but just return a
> NULL checksum instead.
>
> * subversion/libsvn_subr/checksum.c
> (svn_checksum_parse_hex): If given NULL hex, return a NULL checksum.

Don't forget to document this as part of the API, then.

-Karl

> Modified:
> trunk/subversion/libsvn_subr/checksum.c
>
> Modified: trunk/subversion/libsvn_subr/checksum.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/checksum.c?pathrev=32702&r1=32701&r2=32702
> ==============================================================================
> --- trunk/subversion/libsvn_subr/checksum.c Mon Aug 25 10:29:53 2008 (r32701)
> +++ trunk/subversion/libsvn_subr/checksum.c Mon Aug 25 11:46:31 2008 (r32702)
> @@ -137,6 +137,12 @@ svn_checksum_parse_hex(svn_checksum_t **
> int len;
> int i;
>
> + if (hex == NULL)
> + {
> + *checksum = NULL;
> + return SVN_NO_ERROR;
> + }
> +
> SVN_ERR(validate_kind(kind));
>
> *checksum = svn_checksum_create(kind, pool);
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-27 20:46:15 CEST

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.