Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20333
b: refs/heads/master
c: 93544cc
h: refs/heads/master
i:
  20331: 28c47ae
v: v3
  • Loading branch information
Steve French authored and Linus Torvalds committed Feb 15, 2006
1 parent 6947580 commit 87eec33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10ee39fe3ff618d274e1cd0f6abbc2917b736bfd
refs/heads/master: 93544cc6486bea12e127ed58ca33477bb6ceafe6
14 changes: 8 additions & 6 deletions trunk/fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,13 +1442,15 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
&bytes_read, &smb_read_data,
&buf_type);
pSMBr = (struct smb_com_read_rsp *)smb_read_data;
if (copy_to_user(current_offset,
smb_read_data + 4 /* RFC1001 hdr */
+ le16_to_cpu(pSMBr->DataOffset),
bytes_read)) {
rc = -EFAULT;
}
if (smb_read_data) {
if (copy_to_user(current_offset,
smb_read_data +
4 /* RFC1001 length field */ +
le16_to_cpu(pSMBr->DataOffset),
bytes_read)) {
rc = -EFAULT;
}

if(buf_type == CIFS_SMALL_BUFFER)
cifs_small_buf_release(smb_read_data);
else if(buf_type == CIFS_LARGE_BUFFER)
Expand Down

0 comments on commit 87eec33

Please sign in to comment.