@@ -917,7 +917,7 @@ static int handle_video_stm_cs_req(uint8_t rhport, uint8_t stage,
917
917
switch (request -> bRequest ) {
918
918
case VIDEO_REQUEST_SET_CUR :
919
919
if (stage == CONTROL_STAGE_SETUP ) {
920
- TU_VERIFY (sizeof (video_probe_and_commit_control_t ) = = request -> wLength , VIDEO_ERROR_UNKNOWN );
920
+ TU_VERIFY (sizeof (video_probe_and_commit_control_t ) > = request -> wLength , VIDEO_ERROR_UNKNOWN );
921
921
TU_VERIFY (tud_control_xfer (rhport , request , self -> ep_buf , sizeof (video_probe_and_commit_control_t )),
922
922
VIDEO_ERROR_UNKNOWN );
923
923
} else if (stage == CONTROL_STAGE_DATA ) {
@@ -973,7 +973,7 @@ static int handle_video_stm_cs_req(uint8_t rhport, uint8_t stage,
973
973
switch (request -> bRequest ) {
974
974
case VIDEO_REQUEST_SET_CUR :
975
975
if (stage == CONTROL_STAGE_SETUP ) {
976
- TU_VERIFY (sizeof (video_probe_and_commit_control_t ) = = request -> wLength , VIDEO_ERROR_UNKNOWN );
976
+ TU_VERIFY (sizeof (video_probe_and_commit_control_t ) > = request -> wLength , VIDEO_ERROR_UNKNOWN );
977
977
TU_VERIFY (tud_control_xfer (rhport , request , self -> ep_buf , sizeof (video_probe_and_commit_control_t )), VIDEO_ERROR_UNKNOWN );
978
978
} else if (stage == CONTROL_STAGE_DATA ) {
979
979
TU_VERIFY (_update_streaming_parameters (self , (video_probe_and_commit_control_t * )self -> ep_buf ), VIDEO_ERROR_INVALID_VALUE_WITHIN_RANGE );
0 commit comments