[checkers] fix segfault in the checker lookup function
authorChristophe Varoqui <root@xa-s05.(none)>
Tue, 14 Feb 2006 08:03:19 +0000 (09:03 +0100)
committerChristophe Varoqui <root@xa-s05.(none)>
Tue, 14 Feb 2006 08:03:19 +0000 (09:03 +0100)
Multipath was segfaulting on startup because of some pointer arithmatic
craziness with the checkers. The attached patch fixes it.

Benjamin Marzinski, Redhat

libcheckers/checkers.c

index a4a6091..646cd70 100644 (file)
@@ -70,7 +70,7 @@ struct checker * checker_lookup (char * name)
        while (c->check) {
                if (!strncmp(name, c->name, CHECKER_NAME_LEN))
                        return c;
-               c += sizeof(struct checker);
+               c++;
        }
        return NULL;
 }