~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/libsvn_delta/range-index-test.h

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "../../libsvn_delta/compose_delta.c"
28
28
 
29
29
static range_index_node_t *prev_node, *prev_prev_node;
30
 
static apr_off_t
 
30
static apr_size_t
31
31
walk_range_index(range_index_node_t *node, const char **msg)
32
32
{
33
33
  apr_off_t ret;
70
70
{
71
71
  if (-node->target_offset == ndx)
72
72
    {
73
 
      printf("   * Node: [%3"APR_OFF_T_FMT
74
 
             ",%3"APR_OFF_T_FMT
75
 
             ") = %-5"APR_OFF_T_FMT"%s\n",
 
73
      printf("   * Node: [%3"APR_SIZE_T_FMT
 
74
             ",%3"APR_SIZE_T_FMT
 
75
             ") = %-5"APR_SIZE_T_FMT"%s\n",
76
76
             node->offset, node->limit, -node->target_offset, msg);
77
77
    }
78
78
  else
79
79
    {
80
 
      printf("     Node: [%3"APR_OFF_T_FMT
81
 
             ",%3"APR_OFF_T_FMT
82
 
             ") = %"APR_OFF_T_FMT"\n",
 
80
      printf("     Node: [%3"APR_SIZE_T_FMT
 
81
             ",%3"APR_SIZE_T_FMT
 
82
             ") = %"APR_SIZE_T_FMT"\n",
83
83
             node->offset, node->limit,
84
 
             (node->target_offset < 0
85
 
              ? -node->target_offset : node->target_offset));
 
84
             node->target_offset);
86
85
    }
87
86
}
88
87
 
154
153
  ndx = create_range_index(pool);
155
154
  for (i = 1; i <= iterations; ++i)
156
155
    {
157
 
      apr_off_t offset = svn_test_rand(&seed) % 47;
158
 
      apr_off_t limit = offset + svn_test_rand(&seed) % 16 + 1;
 
156
      apr_size_t offset = svn_test_rand(&seed) % 47;
 
157
      apr_size_t limit = offset + svn_test_rand(&seed) % 16 + 1;
159
158
      range_list_node_t *list, *r;
160
 
      apr_off_t ret;
 
159
      apr_size_t ret;
161
160
      const char *msg2;
162
161
 
163
 
      printf("%3d: Inserting [%3"APR_OFF_T_FMT",%3"APR_OFF_T_FMT") ...",
 
162
      printf("%3d: Inserting [%3"APR_SIZE_T_FMT",%3"APR_SIZE_T_FMT") ...",
164
163
             i, offset, limit);
165
164
      splay_range_index(offset, ndx);
166
165
      list = build_range_list(offset, limit, ndx);
170
169
      if (ret == 0)
171
170
        {
172
171
          for (r = list; r; r = r->next)
173
 
            printf(" %s[%3"APR_OFF_T_FMT",%3"APR_OFF_T_FMT")",
 
172
            printf(" %s[%3"APR_SIZE_T_FMT",%3"APR_SIZE_T_FMT")",
174
173
                   (r->kind == range_from_source ?
175
174
                    (++src_cp, "S") : (++tgt_cp, "T")),
176
175
                   r->offset, r->limit);