[PATCH] stkutil: ensure data fits in buffer

"Sicelo A. Mhlongo" <[email protected]>
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
Fixes CVE-2024-7545
---
 src/stkutil.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/stkutil.c b/src/stkutil.c
index 60cad102..bd261b1c 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1916,6 +1916,10 @@ static bool parse_dataobj_mms_content_id(
 
 	data = comprehension_tlv_iter_get_data(iter);
 	mci->len = len;
+
+	if (len > sizeof(mci->id))
+		return false;
+
 	memcpy(mci->id, data, len);
 
 	return true;
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.