Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211674
b: refs/heads/master
c: 3ed02ad
h: refs/heads/master
v: v3
  • Loading branch information
John Johansen authored and James Morris committed Oct 20, 2010
1 parent 0d5233b commit 50d2471
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 9f1c1d426b0402b25cd0d7ca719ffc8e20e46d5f
refs/heads/master: 3ed02ada2a5e695e2fbb5e4a0008cfcb0f50feaa
4 changes: 3 additions & 1 deletion trunk/security/apparmor/apparmorfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* aa_simple_write_to_buffer - common routine for getting policy from user
* @op: operation doing the user buffer copy
* @userbuf: user buffer to copy data from (NOT NULL)
* @alloc_size: size of user buffer
* @alloc_size: size of user buffer (REQUIRES: @alloc_size >= @copy_size)
* @copy_size: size of data to copy from user buffer
* @pos: position write is at in the file (NOT NULL)
*
Expand All @@ -42,6 +42,8 @@ static char *aa_simple_write_to_buffer(int op, const char __user *userbuf,
{
char *data;

BUG_ON(copy_size > alloc_size);

if (*pos != 0)
/* only writes from pos 0, that is complete writes */
return ERR_PTR(-ESPIPE);
Expand Down

0 comments on commit 50d2471

Please sign in to comment.