Skip to content

Commit

Permalink
🐞 fix(dfs_v2): fix memory write-through
Browse files Browse the repository at this point in the history
  • Loading branch information
xqyjlj committed Oct 16, 2023
1 parent 0c44726 commit 95a54ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/dfs/dfs_v2/src/dfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static char *dfs_nolink_path(struct dfs_mnt **mnt, char *fullpath, int mode)
char link_fn[DFS_PATH_MAX] = {0};
struct dfs_dentry *dentry = RT_NULL;

path = (char *)rt_malloc(DFS_PATH_MAX);
path = (char *)rt_malloc((DFS_PATH_MAX * 2) + 1); // path + syslink + \0
if (!path)
{
return path;
Expand Down

0 comments on commit 95a54ea

Please sign in to comment.