summaryrefslogtreecommitdiff
path: root/libdm/regex
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2010-08-09 10:58:27 +0000
committerJoe Thornber <thornber@redhat.com>2010-08-09 10:58:27 +0000
commit0ae41c44129f1c19a8512d654bbd4a05d383a06a (patch)
tree2de92cd9b6aeb2ba31cc2de0ec89f799f2f00433 /libdm/regex
parent52e1564fddf769d481ef8bc89a01c680777bcbbc (diff)
downloadlvm2-0ae41c44129f1c19a8512d654bbd4a05d383a06a.tar.gz
[REGEX] fix a long standing off-by-one error (found by valgrind-pool)
Diffstat (limited to 'libdm/regex')
-rw-r--r--libdm/regex/ttree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdm/regex/ttree.c b/libdm/regex/ttree.c
index 5aa1ba617..ec97c98c7 100644
--- a/libdm/regex/ttree.c
+++ b/libdm/regex/ttree.c
@@ -91,10 +91,10 @@ int ttree_insert(struct ttree *tt, unsigned int *key, void *data)
return 0;
}
- k = *key++;
-
- if (count)
+ if (count) {
+ k = *key++;
c = &((*c)->m);
+ }
}
}
(*c)->data = data;