Commit 206e87e7 authored by Alan Cox's avatar Alan Cox Committed by Steve French

[PATCH] fix the security leak in dmasound

parent 61a35fb9
...@@ -351,8 +351,8 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd, ...@@ -351,8 +351,8 @@ static int mixer_ioctl(struct inode *inode, struct file *file, u_int cmd,
case SOUND_MIXER_INFO: case SOUND_MIXER_INFO:
{ {
mixer_info info; mixer_info info;
strlcpy(info.id, dmasound.mach.name2, sizeof(info.id)); strncpy(info.id, dmasound.mach.name2, sizeof(info.id));
strlcpy(info.name, dmasound.mach.name2, sizeof(info.name)); strncpy(info.name, dmasound.mach.name2, sizeof(info.name));
info.modify_counter = mixer.modify_counter; info.modify_counter = mixer.modify_counter;
if (copy_to_user((int *)arg, &info, sizeof(info))) if (copy_to_user((int *)arg, &info, sizeof(info)))
return -EFAULT; return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment