From 0ae41c44129f1c19a8512d654bbd4a05d383a06a Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 9 Aug 2010 10:58:27 +0000 Subject: [PATCH] [REGEX] fix a long standing off-by-one error (found by valgrind-pool) --- libdm/regex/ttree.c | 6 +++--- 1 file 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; -- 2.43.5