projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45575f5
)
AFS: Potential null dereference
author
Dan Carpenter
<
[email protected]
>
Mon, 22 Mar 2010 13:07:14 +0000
(13:07 +0000)
committer
Linus Torvalds
<
[email protected]
>
Mon, 22 Mar 2010 16:57:19 +0000
(09:57 -0700)
It seems clear from the surrounding code that xpermits is allowed to be
NULL here.
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: David Howells <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/afs/security.c
patch
|
blob
|
history
diff --git
a/fs/afs/security.c
b/fs/afs/security.c
index 3ef504370034c2311fdd50f631856ac95ab76903..bb4ed144d0e446c627fb8b4e391664058d094b87 100644
(file)
--- a/
fs/afs/security.c
+++ b/
fs/afs/security.c
@@
-189,8
+189,9
@@
void afs_cache_permit(struct afs_vnode *vnode, struct key *key, long acl_order)
if (!permits)
goto out_unlock;
- memcpy(permits->permits, xpermits->permits,
- count * sizeof(struct afs_permit));
+ if (xpermits)
+ memcpy(permits->permits, xpermits->permits,
+ count * sizeof(struct afs_permit));
_debug("key %x access %x",
key_serial(key), vnode->status.caller_access);