From: Joe Thornber Date: Mon, 9 Aug 2010 10:58:27 +0000 (+0000) Subject: [REGEX] fix a long standing off-by-one error (found by valgrind-pool) X-Git-Tag: v2_02_91~1612 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=0ae41c44129f1c19a8512d654bbd4a05d383a06a;p=lvm2.git [REGEX] fix a long standing off-by-one error (found by valgrind-pool) --- 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;