2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

odp-util: Fix parsing corner case for encap_nsh() actions.

When nothing matched, the code would loop forever.

Found with libfuzzer.

Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jan Scheurich <jan.scheurich@ericsson.com>
This commit is contained in:
Ben Pfaff
2017-11-28 10:20:32 -08:00
parent 59b1e023ae
commit 0884990e65
2 changed files with 11 additions and 0 deletions

View File

@@ -1870,6 +1870,9 @@ parse_odp_encap_nsh_action(const char *s, struct ofpbuf *actions)
}
continue;
}
ret = -EINVAL;
goto out;
}
out:
if (ret < 0) {