diff options
author | William Tu <u9012063@gmail.com> | 2020-03-17 14:39:40 -0700 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-09-15 22:37:57 +0200 |
commit | 737e846c8dcebdefcfa3d58fd1789990434b8bb0 (patch) | |
tree | 1be94d69482922100323601c82d0bff85937c1ee | |
parent | 2a0ad628bbab5de0c381d1ef1e46c82c37c2deba (diff) | |
download | openvswitch-737e846c8dcebdefcfa3d58fd1789990434b8bb0.tar.gz |
classifier: Fix use of uninitialized value.
Coverity reports use of uninitialized value of cursor.
This happens in cls_cursor_start(), when rule is false,
cursor.subtable is uninitialized. CID 279324.
Signed-off-by: William Tu <u9012063@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r-- | lib/classifier.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/classifier.c b/lib/classifier.c index cb136f652..4272c4515 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -1370,6 +1370,7 @@ cls_cursor_start(const struct classifier *cls, const struct cls_rule *target, struct cls_cursor cursor; struct cls_subtable *subtable; + memset(&cursor, 0x0, sizeof cursor); cursor.cls = cls; cursor.target = target && !cls_rule_is_catchall(target) ? target : NULL; cursor.version = version; |