[ovs-dev] [PATCH] ossfuzz: Fix expr target build failure
bshastry at sect.tu-berlin.de
bshastry at sect.tu-berlin.de
Thu May 30 10:38:23 UTC 2019
From: Bhargava Shastry <bshastry at sect.tu-berlin.de>
Google oss-fuzz reported a build failure for the OVN expression parser.
Upon investigation, it turned out that the expr_parse_target fuzzer was
not being run by Google due to the said failure.
The root cause of the build failure turned out to be a change in the
definition of the expr_parse_string() API. Now, this API accepts an
additional parameter of type struct sset * that points to the set of
address set referenced which may be NULL if unused.
This patch adds this additional parameter to expr_parse_string()
setting the pointer to the set of address set referenced to NULL.
Once this patch is applied, ossfuzz's expr_parse_target should build
and subsequently be fuzzed.
Signed-off-by: Bhargava Shastry <bshastry at sect.tu-berlin.de>
---
tests/oss-fuzz/expr_parse_target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/oss-fuzz/expr_parse_target.c b/tests/oss-fuzz/expr_parse_target.c
index 1fdd3895b..7416421b8 100644
--- a/tests/oss-fuzz/expr_parse_target.c
+++ b/tests/oss-fuzz/expr_parse_target.c
@@ -359,7 +359,7 @@ test_parse_expr(const char *input)
simap_put(&ports, "lsp3", 0x13);
expr = expr_parse_string(input, &symtab, &addr_sets,
- &port_groups, &error);
+ &port_groups, NULL, &error);
if (!error) {
expr = expr_annotate(expr, &symtab, &error);
}
--
2.17.1
More information about the dev
mailing list