sim/video: call validate_buf when set_buf
@@ -190,6 +190,11 @@ static int sim_video_data_validate_buf(uint8_t *addr, uint32_t size)
static int sim_video_data_set_buf(uint8_t *addr, uint32_t size)
{
+ if (sim_video_data_validate_buf(addr, size) < 0)
+ {
+ return -EINVAL;
+ }
+
g_sim_video_priv.next_buf = addr;
g_sim_video_priv.buf_size = size;
return 0;
