Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102746988
D43199.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D43199.diff
View Options
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -1449,7 +1449,7 @@
if (!error) {
lth.cdth_trk0 = th.starting_track;
lth.cdth_trk1 = th.ending_track;
- copyout(<h, (void *)args->arg, sizeof(lth));
+ error = copyout(<h, (void *)args->arg, sizeof(lth));
}
break;
}
@@ -1611,7 +1611,8 @@
if (error) {
if (lda.type == LINUX_DVD_HOST_SEND_KEY2) {
lda.type = LINUX_DVD_AUTH_FAILURE;
- copyout(&lda, (void *)args->arg, sizeof(lda));
+ (void)copyout(&lda, (void *)args->arg,
+ sizeof(lda));
}
break;
}
@@ -1771,9 +1772,10 @@
struct linux_old_mixer_info info;
bzero(&info, sizeof(info));
strncpy(info.id, "OSS", sizeof(info.id) - 1);
- strncpy(info.name, "FreeBSD OSS Mixer", sizeof(info.name) - 1);
- copyout(&info, (void *)args->arg, sizeof(info));
- return (0);
+ strncpy(info.name, "FreeBSD OSS Mixer",
+ sizeof(info.name) - 1);
+ return (copyout(&info, (void *)args->arg,
+ sizeof(info)));
}
default:
return (ENOIOCTL);
@@ -3214,7 +3216,9 @@
error = fo_ioctl(fp, VIDIOC_TRY_FMT, &vformat,
td->td_ucred, td);
bsd_to_linux_v4l2_format(&vformat, &l_vformat);
- copyout(&l_vformat, (void *)args->arg, sizeof(l_vformat));
+ if (error == 0)
+ error = copyout(&l_vformat, (void *)args->arg,
+ sizeof(l_vformat));
fdrop(fp, td);
return (error);
@@ -3283,7 +3287,9 @@
error = fo_ioctl(fp, VIDIOC_DQBUF, &vbuf,
td->td_ucred, td);
bsd_to_linux_v4l2_buffer(&vbuf, &l_vbuf);
- copyout(&l_vbuf, (void *)args->arg, sizeof(l_vbuf));
+ if (error == 0)
+ error = copyout(&l_vbuf, (void *)args->arg,
+ sizeof(l_vbuf));
fdrop(fp, td);
return (error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 3:57 PM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14681817
Default Alt Text
D43199.diff (1 KB)
Attached To
Mode
D43199: linux: Check for copyout errors in ioctl handlers
Attached
Detach File
Event Timeline
Log In to Comment