Skip to content

fs: ensure nullCheck() callback is a function

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/access into v1.x

Currently, nullCheck() will attempt to invoke any truthy value as a function if the path argument contains a null character. This commit validates that the callback is actually a function before trying to invoke it. fs.access() was vulnerable to this bug, as nullCheck() was called prior to type checking its callback.

Merge request reports

Loading