Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b000056a authored by David Zafman's avatar David Zafman Committed by Alex Elder
Browse files

ceph: Fix NULL ptr crash in strlen()

set_request_path_attr() checks for NULL ptr before calling strlen()

This fixes http://tracker.newdream.net/issues/3404



Signed-off-by: default avatarDavid Zafman <david.zafman@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent 7246240c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}