Skip to content

Commit

Permalink
Fix vdir_open_ext NULL dereference bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLR committed Sep 18, 2023
1 parent f5b2e0d commit 72d2a16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/io/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2024,11 +2024,11 @@ vdir *vdir_open_ext(const char *path, int flags)
path = vio_normalize_virtual_path(vfs_base, buffer, MAX_PATH, path);
#endif

flags &= VDIR_PUBLIC_MASK;
dir->flags = flags;

if(dir)
{
flags &= VDIR_PUBLIC_MASK;
dir->flags = flags;

// There may be virtual files in this directory, or this directory
// may also be virtual. Both real and virtual files need to be listed.
// TODO: overlaid files should replace the real file somehow? ugh
Expand Down

0 comments on commit 72d2a16

Please sign in to comment.