提交 56c0df1e 编写于 作者: S shaojinchun

修正dfs在fd_get时,未检查有效性的问题

上级 538923d3
......@@ -221,7 +221,7 @@ struct dfs_fd *fd_get(int fd)
d = fdt->fds[fd];
/* check dfs_fd valid or not */
if (d->magic != DFS_FD_MAGIC)
if ((d == NULL) || (d->magic != DFS_FD_MAGIC))
{
dfs_unlock();
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册