]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: set clone's initial data to NULL
authorJan Engelhardt <jengelh@medozas.de>
Sun, 10 Jul 2011 09:47:46 +0000 (11:47 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 10 Jul 2011 09:51:10 +0000 (11:51 +0200)
Avoid a crash in xs_init_match when a clone's m->udata points at the
parent.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
iptables/xtables.c

index b05df97b1a5cc23ddc266d7ac2783e811668baf2..1a5e568c6d64b420846fca1541681947d88a7c84 100644 (file)
@@ -632,6 +632,7 @@ xtables_find_match(const char *name, enum xtables_tryload tryload,
                        /* Second and subsequent clones */
                        clone = xtables_malloc(sizeof(struct xtables_match));
                        memcpy(clone, ptr, sizeof(struct xtables_match));
+                       clone->udata = NULL;
                        clone->mflags = 0;
                        /* This is a clone: */
                        clone->next = clone;