->len is uint8_t, so we can't handle more than this. --- src/udata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udata.c b/src/udata.c index 6bd965161c43..b5a47295b40d 100644 --- a/src/udata.c +++ b/src/udata.c @@ -74,7 +74,7 @@ bool nftnl_udata_put(struct nftnl_udata_buf *buf, uint8_t type, uint32_t len, { struct nftnl_udata *attr; - if (buf->size < len + sizeof(struct nftnl_udata)) + if (len > UINT8_MAX || buf->size < len + sizeof(struct nftnl_udata)) return false; attr = (struct nftnl_udata *)buf->end; -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html