Skip to content

Commit b732d96

Browse files
committed
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] SN2: security hole in sn2_ptc_proc_write
2 parents a744e01 + e0c6d97 commit b732d96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/ia64/sn/kernel/sn2/sn2_smp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,8 @@ static ssize_t sn2_ptc_proc_write(struct file *file, const char __user *user, si
512512
int cpu;
513513
char optstr[64];
514514

515+
if (count > sizeof(optstr))
516+
return -EINVAL;
515517
if (copy_from_user(optstr, user, count))
516518
return -EFAULT;
517519
optstr[count - 1] = '\0';

0 commit comments

Comments
 (0)