From 9351405e44641037ccff29c0d88d92c0617b5088 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 8 May 2024 05:21:38 +0200 Subject: Merging 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