summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/odp-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 6932cdf64..439622c5f 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2318,6 +2318,10 @@ parse_odp_key_mask_attr(const char *s, const struct simap *port_names,
if (retval < 0) {
return retval;
}
+
+ if (nl_attr_oversized(key->size - encap - NLA_HDRLEN)) {
+ return -E2BIG;
+ }
s += retval;
}
s++;