mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-05-15 06:36:00 +00:00
drivers/ipc: validate pipe ioctl args
This commit is contained in:
@@ -190,6 +190,11 @@ static int pipe_fops_ioctl(struct dfs_file *fd, int cmd, void *args)
|
||||
|
||||
pipe = (rt_pipe_t *)fd->vnode->data;
|
||||
|
||||
if (args == RT_NULL)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch ((rt_ubase_t)cmd)
|
||||
{
|
||||
case FIONREAD:
|
||||
|
||||
Reference in New Issue
Block a user