]> git.proxmox.com Git - mirror_ovs.git/commit
odp-util: Fix fuzz runtime error of invalid dont_send value
authorYifeng Sun <pkusunyifeng@gmail.com>
Thu, 27 Dec 2018 00:52:23 +0000 (16:52 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 27 Dec 2018 19:11:23 +0000 (11:11 -0800)
commitabaf6dcf685cbb5dd828fd73611e2aa647945857
treec045833e3d477b19381c2e86e039ff5c1cab6101
parente8833217914f9c071c4963fd99e88b03cac8fd3b
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>
lib/odp-util.c
lib/odp-util.h