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

Re: ra_svn vwrite_tuple() optional elements robustness

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Mon, 14 Nov 2016 12:50:51 +0100

On 06.11.2016 02:21, Daniel Shahaf wrote:
> During the r1767197 thread, I noticed that vwrite_tuple() doesn't
> enforce its precondition that in the optional part of a tuple, either
> all values are valid or no value is; a call such as
> vwrite_tuple("(?r?r)", SVN_INVALID_REVNUM, (svn_revnum_t) 42)
> would happily generate a «( 42 ) » tuple, instead of triggering an
> This would be easy to fix, and would prevent a class of bugs.
This function seems to have a number of bugs,
for instance:

* optional sub-structs don't get a "("
* the OPT flag is global instead of per-struct

If there is an efficient way to fix these, please
feel free to do so ;)

-- Stefan^2.
Received on 2016-11-14 12:51:12 CET

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.