From a72bbcd13c515079b13dfcc3f57e933f28235f48 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 8 May 2024 05:21:30 +0200 Subject: Adding upstream version 4.19.260. Signed-off-by: Daniel Baumann --- security/selinux/ss/policydb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'security/selinux/ss') diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h index 215f8f30a..2a479785e 100644 --- a/security/selinux/ss/policydb.h +++ b/security/selinux/ss/policydb.h @@ -360,6 +360,8 @@ static inline int put_entry(const void *buf, size_t bytes, int num, struct polic { size_t len = bytes * num; + if (len > fp->len) + return -EINVAL; memcpy(fp->data, buf, len); fp->data += len; fp->len -= len; -- cgit v1.2.3