From 3c7253c99bdc61a6667b52f6be5c8cc612aac725 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 a0a372f8c..5e2b87654 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -6134,6 +6134,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