-
Avi Kivity authored
When a file incorrectly is used as a directory ("/bin/sh/foo"), namei() detects this and fails, but returns 0 as the error code. Later on open() uses an uninitialized vnode and segaults. Fix by returning ENOENT. Fixes fontconfig segfault when it randomly tries to open files as Mac fonts with resource/data forks.
Avi Kivity authoredWhen a file incorrectly is used as a directory ("/bin/sh/foo"), namei() detects this and fails, but returns 0 as the error code. Later on open() uses an uninitialized vnode and segaults. Fix by returning ENOENT. Fixes fontconfig segfault when it randomly tries to open files as Mac fonts with resource/data forks.