kernel/fs: NULL is a valid buffer to pass to ioctl().

Another bug exposed by hrev52905. Discovered because Expander was
not displaying archive contents anymore.
This commit is contained in:
Augustin Cavalier
2019-02-21 22:12:32 -05:00
parent 60497373d0
commit aa5cb68bc6
+1 -1
View File
@@ -915,7 +915,7 @@ _user_seek(int fd, off_t pos, int seekType)
status_t
_user_ioctl(int fd, uint32 op, void* buffer, size_t length)
{
if (!IS_USER_ADDRESS(buffer))
if (buffer != NULL && !IS_USER_ADDRESS(buffer))
return B_BAD_ADDRESS;
TRACE(("user_ioctl: fd %d\n", fd));