summaryrefslogtreecommitdiffstats
path: root/security/smack
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-05-21 18:42:54 +0200
committerJames Morris <jmorris@namei.org>2009-05-22 12:34:48 +1000
commit6470c077cae12227318f40f3e6d756caadcce4b0 (patch)
treec8a543bccd29dfcf7d4bbb104a4786da0c93cf56 /security/smack
parentc9d9ac525a0285a5b5ad9c3f9aa8b7c1753e6121 (diff)
downloadlinux-stable-6470c077cae12227318f40f3e6d756caadcce4b0.tar.gz
linux-stable-6470c077cae12227318f40f3e6d756caadcce4b0.tar.bz2
linux-stable-6470c077cae12227318f40f3e6d756caadcce4b0.zip
smack: do not beyond ARRAY_SIZE of data
Do not go beyond ARRAY_SIZE of data Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/smack')
-rw-r--r--security/smack/smackfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 904af3483286..8d3c2a051c7b 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -776,7 +776,7 @@ static ssize_t smk_write_netlbladdr(struct file *file, const char __user *buf,
struct sockaddr_in newname;
char smack[SMK_LABELLEN];
char *sp;
- char data[SMK_NETLBLADDRMAX];
+ char data[SMK_NETLBLADDRMAX + 1];
char *host = (char *)&newname.sin_addr.s_addr;
int rc;
struct netlbl_audit audit_info;