subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r925290 - /subversion/trunk/subversion/libsvn_subr/mergeinfo.c
Date Fri, 19 Mar 2010 15:58:35 GMT
Author: julianfoad
Date: Fri Mar 19 15:58:35 2010
New Revision: 925290

URL: http://svn.apache.org/viewvc?rev=925290&view=rev
Log:
* subversion/libsvn_subr/mergeinfo.c
  (parse_rangelist): Validate that revision numbers are not zero, as that
    is invalid mergeinfo and since r924201 would cause an assertion failure.
    Also, expand the doc string.

Modified:
    subversion/trunk/subversion/libsvn_subr/mergeinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=925290&r1=925289&r2=925290&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Fri Mar 19 15:58:35 2010
@@ -459,6 +459,10 @@ range_to_string(const svn_merge_range_t 
 }
 
 /* Helper for svn_mergeinfo_parse()
+   Append revision ranges onto the array RANGELIST to represent the range
+   descriptions found in the string *INPUT.  Read only as far as a newline
+   or the position END, whichever comes first.  Set *INPUT to the position
+   after the last character of INPUT that was used.
 
    revisionlist -> (revisionelement)(COMMA revisionelement)*
    revisionrange -> REVISION "-" REVISION("*")
@@ -503,6 +507,11 @@ parse_rangelist(const char **input, cons
       mrange->end = firstrev;
       mrange->inheritable = TRUE;
 
+      if (firstrev == 0)
+        return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
+                                 _("Invalid revision number '0' found in "
+                                   "range list"));
+
       if (*curr == '-')
         {
           svn_revnum_t secondrev;



Mime
View raw message