subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1616956 - /subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c
Date Sat, 09 Aug 2014 14:10:53 GMT
Author: brane
Date: Sat Aug  9 14:10:52 2014
New Revision: 1616956

URL: http://svn.apache.org/r1616956
Log:
On the authzperf branch: Fix thinko.

* subversion/libsvn_repos/authz_parse.c
  (rules_open_section): Use exact match, not prefix match,
   to parse the glob token.

Modified:
    subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c

Modified: subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c?rev=1616956&r1=1616955&r2=1616956&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c (original)
+++ subversion/branches/authzperf/subversion/libsvn_repos/authz_parse.c Sat Aug  9 14:10:52
2014
@@ -356,7 +356,9 @@ rules_open_section(void *baton, const ch
             SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
             _("Empty repository name in authz rule [%s]"),
             section);
-      if (strncmp(rule, glob_rule_token, endp - rule))
+      /* Note: the size of glob_rule_token includes the NUL terminator. */
+      if (endp - rule != sizeof(glob_rule_token) - 1
+          || memcmp(rule, glob_rule_token, endp - rule))
         return svn_error_createf(
             SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
             _("Invalid type token '%s' in authz rule [%s]"),



Mime
View raw message