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

odp-util: Fix fuzz runtime error of invalid dont_send value

Oss-fuzz complains that (struct user_action_cookie)->controller->dont_send
has invalid vlue, like below:
runtime error: load of value 26, which is not a valid value for type 'bool'

From this piece of code "cookie.controller.dont_send ? 1 : 0", it looks
like that we want to tolerate values than 0 and 1.

Thus, this patch changes the types of dont_send and continuation from bool
to uint8_t in order to make oss-fuzz happy.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11330
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Yifeng Sun
2018-12-26 16:52:23 -08:00
committed by Ben Pfaff
parent e883321791
commit abaf6dcf68
2 changed files with 4 additions and 4 deletions

View File

@@ -339,8 +339,8 @@ struct user_action_cookie {
struct {
/* USER_ACTION_COOKIE_CONTROLLER. */
bool dont_send; /* Don't send the packet to controller. */
bool continuation; /* Send packet-in as a continuation. */
uint8_t dont_send; /* Don't send the packet to controller. */
uint8_t continuation; /* Send packet-in as a continuation. */
uint16_t reason;
uint32_t recirc_id;
ovs_32aligned_be64 rule_cookie;