Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68593
b: refs/heads/master
c: e265cfa
h: refs/heads/master
i:
  68591: e0c6b86
v: v3
  • Loading branch information
David Brownell authored and Jean Delvare committed Oct 13, 2007
1 parent 30bfe2a commit 3c7a32a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 9d90c1fd9bdbffb456d1b1ef05215343503fd0b0
refs/heads/master: e265cfa19c1220938de5f0291ed8d549a523de3c
6 changes: 4 additions & 2 deletions trunk/drivers/i2c/i2c-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ static int i2cdev_ioctl(struct inode *inode, struct file *file,

res = 0;
for( i=0; i<rdwr_arg.nmsgs; i++ ) {
/* Limit the size of the message to a sane amount */
if (rdwr_pa[i].len > 8192) {
/* Limit the size of the message to a sane amount;
* and don't let length change either. */
if ((rdwr_pa[i].len > 8192) ||
(rdwr_pa[i].flags & I2C_M_RECV_LEN)) {
res = -EINVAL;
break;
}
Expand Down

0 comments on commit 3c7a32a

Please sign in to comment.