public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smack:beyond ARRAY_SIZE of data
@ 2009-05-20 15:19 Roel Kluin
  2009-05-20 22:27 ` Casey Schaufler
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Kluin @ 2009-05-20 15:19 UTC (permalink / raw)
  To: jmorris; +Cc: lkml, linux-security-module, Andrew Morton

Do not go beyond ARRAY_SIZE of data

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index e03a7e1..7407e5c 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -797,7 +797,7 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
 		return -EPERM;
 	if (*ppos != 0)
 		return -EINVAL;
-	if (count < SMK_NETLBLADDRMIN || count > SMK_NETLBLADDRMAX)
+	if (count < SMK_NETLBLADDRMIN || count >= SMK_NETLBLADDRMAX)
 		return -EINVAL;
 	if (copy_from_user(data, buf, count) != 0)
 		return -EFAULT;


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-22  4:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 15:19 [PATCH] smack:beyond ARRAY_SIZE of data Roel Kluin
2009-05-20 22:27 ` Casey Schaufler
2009-05-21 16:42   ` Roel Kluin
2009-05-22  2:30     ` Casey Schaufler
2009-05-22  2:42       ` James Morris
2009-05-22  4:35         ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox