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