]> sourceware.org Git - lvm2.git/commitdiff
[REGEX] fix a long standing off-by-one error (found by valgrind-pool)
authorJoe Thornber <thornber@redhat.com>
Mon, 9 Aug 2010 10:58:27 +0000 (10:58 +0000)
committerJoe Thornber <thornber@redhat.com>
Mon, 9 Aug 2010 10:58:27 +0000 (10:58 +0000)
libdm/regex/ttree.c

index 5aa1ba61715c1ee3d7d59226abd34be1c4bb8202..ec97c98c70d84ce670857ae89e73cf52746a3f03 100644 (file)
@@ -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;
This page took 0.039343 seconds and 5 git commands to generate.