smack: do not beyond ARRAY_SIZE of data

Do not go beyond ARRAY_SIZE of data

Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Casey Schaufler <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
Roel Kluin 2009-05-21 18:42:54 +02:00 • committed by James Morris
commit 6470c077ca

View file

@ -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;