Commit b616a085 authored by Alan Cox's avatar Alan Cox Committed by Steve French

[PATCH] fix security leaks in cmpci

parent 3d4dcdfc
......@@ -1272,8 +1272,8 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
VALIDATE_STATE(s);
if (cmd == SOUND_MIXER_INFO) {
mixer_info info;
strlcpy(info.id, "cmpci", sizeof(info.id));
strlcpy(info.name, "C-Media PCI", sizeof(info.name));
strncpy(info.id, "cmpci", sizeof(info.id));
strncpy(info.name, "C-Media PCI", sizeof(info.name));
info.modify_counter = s->mix.modcnt;
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
......@@ -1281,8 +1281,8 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
}
if (cmd == SOUND_OLD_MIXER_INFO) {
_old_mixer_info info;
strlcpy(info.id, "cmpci", sizeof(info.id));
strlcpy(info.name, "C-Media cmpci", sizeof(info.name));
strncpy(info.id, "cmpci", sizeof(info.id));
strncpy(info.name, "C-Media cmpci", sizeof(info.name));
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
return 0;
......
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