Opened 7 years ago

Closed 2 years ago

#9625 closed bug (fixed)

Incorrect KPath use in VFS where NULL paths are allowed

Reported by: bonefish Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: vfs Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

There seem to be a few places in the VFS code (particularly the _kern_*() functions that accept FD and path combos) where instead of a NULL path an empty path buffer is passed to the worker functions, while a NULL path should be passed instead.

Change History (2)

comment:1 by axeld, 3 years ago

Wouldn't it make more sense to have KPath not allocate a buffer in case it was constructed with a NULL path by default, and therefore also return NULL as path itself?

That would simplify the code in the VFS quite a bit, at least.

comment:2 by axeld, 2 years ago

Resolution: fixed
Status: newclosed

Fixed all occasions in vfs.cpp in hrev51145 using the KPath::LAZY_ALLOC feature.

Note: See TracTickets for help on using tickets.