Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102779189
D43258.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
902 B
Referenced Files
None
Subscribers
None
D43258.diff
View Options
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -3361,8 +3361,7 @@
goto out;
if (VOP_PATHCONF(invp, _PC_MIN_HOLE_SIZE, &holein) != 0)
holein = 0;
- if (holein > 0)
- error = vn_getsize_locked(invp, &insize, incred);
+ error = vn_getsize_locked(invp, &insize, incred);
VOP_UNLOCK(invp);
if (error != 0)
goto out;
@@ -3398,7 +3397,11 @@
*/
if (error == 0)
error = vn_getsize_locked(outvp, &outsize, outcred);
- if (error == 0 && outsize > *outoffp && outsize <= *outoffp + len) {
+ if (error == 0 && outsize > *outoffp &&
+ *outoffp <= OFF_MAX - len && outsize <= *outoffp + len &&
+ *inoffp < insize &&
+ *outoffp <= OFF_MAX - (insize - *inoffp) &&
+ outsize <= *outoffp + (insize - *inoffp)) {
#ifdef MAC
error = mac_vnode_check_write(curthread->td_ucred,
outcred, outvp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 1:55 AM (21 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14688312
Default Alt Text
D43258.diff (902 B)
Attached To
Mode
D43258: Fix copy_file_range(2) so that it does not truncate the output file erroneously
Attached
Detach File
Event Timeline
Log In to Comment