Skip to content

Commit

Permalink
smack: do not beyond ARRAY_SIZE of data
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
RoelKluin authored and James Morris committed May 22, 2009
1 parent c9d9ac5 commit 6470c07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/smack/smackfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6470c07

Please sign in to comment.