提交 f0a0ac2e 编写于 作者: E Eric Van Hensbergen

9p: fix oops in protocol stat parsing error path.

When we get an error on parsing a stat due to a protocol bug, 
we can generate an oops during cleanup because we didn't 
initialize the string pointers in the stat structure.
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>

上级 57c7b4e6
......@@ -215,7 +215,7 @@ p9pdu_vreadf(struct p9_fcall *pdu, int optional, const char *fmt, va_list ap)
struct p9_wstat *stbuf =
va_arg(ap, struct p9_wstat *);
stbuf->extension = NULL;
memset(stbuf, 0, sizeof(struct p9_wstat));
stbuf->n_uid = stbuf->n_gid = stbuf->n_muid =
-1;
errcode =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册