Fail gracefull when NULL path is passed to open()

This commit is contained in:
Lubos Dolezel 2018-05-28 21:59:24 +02:00
parent 75d82d99d3
commit a34b5f3267

View File

@ -28,6 +28,8 @@ long sys_openat(int fd, const char* filename, int flags, unsigned int mode)
long sys_openat_nocancel(int fd, const char* filename, int flags, unsigned int mode)
{
int ret, linux_flags;
if (!filename)
return -EFAULT;
linux_flags = oflags_bsd_to_linux(flags);