projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7246240
)
ceph: Fix NULL ptr crash in strlen()
author
David Zafman
<david.zafman@inktank.com>
Thu, 25 Oct 2012 17:23:46 +0000
(10:23 -0700)
committer
Alex Elder
<elder@inktank.com>
Fri, 26 Oct 2012 21:35:07 +0000
(16:35 -0500)
set_request_path_attr() checks for NULL ptr before calling strlen()
This fixes http://tracker.newdream.net/issues/3404
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/mds_client.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ceph/mds_client.c
b/fs/ceph/mds_client.c
index 1bcf712655d90a6001db4e8de8e86cfa3a70187d..62d2342eb26795cb5e05d0546c17a2d4b69c5bcf 100644
(file)
--- a/
fs/ceph/mds_client.c
+++ b/
fs/ceph/mds_client.c
@@
-1590,7
+1590,7
@@
static int set_request_path_attr(struct inode *rinode, struct dentry *rdentry,
} else if (rpath || rino) {
*ino = rino;
*ppath = rpath;
- *pathlen =
strlen(rpath)
;
+ *pathlen =
rpath ? strlen(rpath) : 0
;
dout(" path %.*s\n", *pathlen, rpath);
}