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

ra_svn vwrite_tuple() optional elements robustness

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 6 Nov 2016 01:21:36 +0000

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
SVN_ERR_MALFUNCTION().

This would be easy to fix, and would prevent a class of bugs.

Cheers,

Daniel
Received on 2016-11-06 02:23:54 CET

This is an archived mail posted to the Subversion Dev mailing list.