Skip to content

Commit e994162

Browse files
AphlitaRbb666
authored andcommitted
bsp/qemu-aarch64: validate RTC control args
1 parent 5890ece commit e994162

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bsp/qemu-virt64-aarch64/drivers/drv_rtc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ static rt_err_t pl031_rtc_control(rt_device_t dev, int cmd, void *args)
6464

6565
RT_ASSERT(dev != RT_NULL);
6666

67+
if (args == RT_NULL)
68+
{
69+
return -RT_EINVAL;
70+
}
71+
6772
switch (cmd)
6873
{
6974
case RT_DEVICE_CTRL_RTC_GET_TIME:

0 commit comments

Comments
 (0)