From a790e328604eaf1bc907bb45b5e791e8e4d9857b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 14 Jul 2014 14:33:01 -0700 Subject: [PATCH] ofp-util: Fix null pointer dereference in ofputil_pull_buckets(). Found by clang-analyzer. Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- lib/ofp-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 09e44383e..b30365348 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -6978,6 +6978,7 @@ ofputil_pull_buckets(struct ofpbuf *msg, size_t buckets_length, if (!ob) { VLOG_WARN_RL(&bad_ofmsg_rl, "buckets end with %"PRIuSIZE" leftover bytes", buckets_length); + return OFPERR_OFPGMFC_BAD_BUCKET; } ob_len = ntohs(ob->len); -- 2.20.1