[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1333039766-8617-6-git-send-email-djkurtz@chromium.org>
Date: Fri, 30 Mar 2012 00:49:15 +0800
From: Daniel Kurtz <djkurtz@...omium.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Henrik Rydberg <rydberg@...omail.se>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Nick Dyer <nick.dyer@...ev.co.uk>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, Benson Leung <bleung@...omium.org>,
Yufeng Shen <miletus@...omium.org>
Cc: Daniel Kurtz <djkurtz@...omium.org>
Subject: [PATCH 05/16 v2] Input: atmel_mxt_ts - verify object size in mxt_write_object
Don't allow writing past the length of an object.
Signed-off-by: Daniel Kurtz <djkurtz@...omium.org>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 920b35c..242976d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -501,7 +501,7 @@ static int mxt_write_object(struct mxt_data *data,
u16 reg;
object = mxt_get_object(data, type);
- if (!object)
+ if (!object || offset >= object->size)
return -EINVAL;
reg = object->start_address;
--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists