summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f8f2f9)
raw | patch | inline | side by side (parent: 7f8f2f9)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 28 Feb 2015 19:05:14 +0000 (20:05 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 3 Mar 2015 22:56:39 +0000 (23:56 +0100) |
Don't look past the end of the array but check the boundary first.
src/powerdns.c | patch | blob | history |
diff --git a/src/powerdns.c b/src/powerdns.c
index a140a126a98380b5277ed352d1adee51c9e2bf49..f3d408302e17ba194607e567ac6433e793df294f 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
if (strcmp (lookup_table[i].name, pdns_type) == 0)
break;
- if (lookup_table[i].type == NULL)
- return;
-
if (i >= lookup_table_length)
{
INFO ("powerdns plugin: submit: Not found in lookup table: %s = %s;",
return;
}
+ if (lookup_table[i].type == NULL)
+ return;
+
type = lookup_table[i].type;
type_instance = lookup_table[i].type_instance;