Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165010
b: refs/heads/master
c: 92d07e4
h: refs/heads/master
v: v3
  • Loading branch information
Steve Holland authored and Greg Kroah-Hartman committed Sep 23, 2009
1 parent 71a6fae commit 5626f6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2cd26e15b84b964c489f2aff278cdaf03840c93
refs/heads/master: 92d07e422df3cc5370d0d9b95a671abb69d50ef1
4 changes: 4 additions & 0 deletions trunk/drivers/usb/class/usbtmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
n_characters = this_part;
}

/* Bound amount of data received by amount of data requested */
if (n_characters > this_part)
n_characters = this_part;

/* Copy buffer to user space */
if (copy_to_user(buf + done, &buffer[12], n_characters)) {
/* There must have been an addressing problem */
Expand Down

0 comments on commit 5626f6a

Please sign in to comment.