diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-01-23 03:06:24 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-01-24 15:29:23 +0100 |
commit | 093fc3b098dc5fadef5d8ad4b225db9fb124758b (patch) | |
tree | ff51133ea2d578cd128502c3bfeeb69a2a59b152 /source/pdf | |
parent | 71ceebcf56e682504da22c4035b39a2d451e8ffd (diff) | |
download | mupdf-093fc3b098dc5fadef5d8ad4b225db9fb124758b.tar.xz |
Assert node range conditions when checking cmap splay trees.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-cmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/pdf/pdf-cmap.c b/source/pdf/pdf-cmap.c index bedc1304..29d9c506 100644 --- a/source/pdf/pdf-cmap.c +++ b/source/pdf/pdf-cmap.c @@ -445,8 +445,12 @@ do_check(cmap_splay *node, void *arg) { cmap_splay *tree = arg; unsigned int num = node - tree; - assert(node->left == EMPTY || tree[node->left].parent == num); - assert(node->right == EMPTY || tree[node->right].parent == num); + assert(!node->many || node->low == node->high); + assert(node->low <= node->high); + assert((node->left == EMPTY) || (tree[node->left].parent == num && + tree[node->left].high < node->low)); + assert(node->right == EMPTY || (tree[node->right].parent == num && + node->high < tree[node->right].low)); } static void |