From: Roel Kluin Date: Thu, 21 May 2009 16:42:54 +0000 (+0200) Subject: smack: do not beyond ARRAY_SIZE of data X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6470c077cae12227318f40f3e6d756caadcce4b0;p=linux-beck.git smack: do not beyond ARRAY_SIZE of data Do not go beyond ARRAY_SIZE of data Signed-off-by: Roel Kluin Acked-by: Casey Schaufler Signed-off-by: James Morris --- 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;