Philip Martin wrote:
> hwright_at_tigris.org writes:
>
>> Author: hwright
>> Date: Mon Aug 25 11:46:31 2008
>> New Revision: 32702
>>
>> 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.
>>
>> Modified:
>> trunk/subversion/libsvn_subr/checksum.c
>
> Strange thing to support in my view. If it is going to behave this
> way it needs to be documented in the header at the very least, even
> better would be a regression test. Giving the code undocumented
> "magic" behaviour is a bad idea.
Wouldn't it be better to have SVN_ASSERT(hex != NULL) for the hex argument then
allow a NULL string return a NULL checksum? This sounds like its opening up to
easier bugs
Blair
---------------------------------------------------------------------
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-28 22:14:18 CEST