From: Ben Pfaff Date: Mon, 14 Jul 2014 21:33:01 +0000 (-0700) Subject: ofp-util: Fix null pointer dereference in ofputil_pull_buckets(). X-Git-Tag: v2.3~25 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=a790e328604eaf1bc907bb45b5e791e8e4d9857b ofp-util: Fix null pointer dereference in ofputil_pull_buckets(). Found by clang-analyzer. Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- 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);