29 lines
949 B
Diff
29 lines
949 B
Diff
|
From 0520d423977f67cafc2157f07e21e0318d4c578a Mon Sep 17 00:00:00 2001
|
||
|
From: Alexey Min <alexey.min@gmail.com>
|
||
|
Date: Wed, 14 Jul 2021 01:11:53 +0300
|
||
|
Subject: [PATCH 2/7] ipa_v3: fix potential buffer overflow
|
||
|
|
||
|
This causes compile errors!
|
||
|
|
||
|
Signed-off-by: Alexey Min <alexey.min@gmail.com>
|
||
|
---
|
||
|
drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c b/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c
|
||
|
index 0cf0e60617b9..0183894a32d7 100644
|
||
|
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c
|
||
|
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c
|
||
|
@@ -2069,7 +2069,7 @@ static ssize_t ipa_debugfs_enable_disable_drop_stats(struct file *file,
|
||
|
goto bail;
|
||
|
}
|
||
|
|
||
|
- missing = copy_from_user(dbg_buff, ubuf, count);
|
||
|
+ missing = copy_from_user(dbg_buff, ubuf, min(sizeof(dbg_buff), count));
|
||
|
if (missing) {
|
||
|
ret = -EFAULT;
|
||
|
goto bail;
|
||
|
--
|
||
|
2.31.1
|
||
|
|