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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user