@@ -917,7 +917,7 @@ static int handle_video_stm_cs_req(uint8_t rhport, uint8_t stage,
917917 switch (request -> bRequest ) {
918918 case VIDEO_REQUEST_SET_CUR :
919919 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 );
921921 TU_VERIFY (tud_control_xfer (rhport , request , self -> ep_buf , sizeof (video_probe_and_commit_control_t )),
922922 VIDEO_ERROR_UNKNOWN );
923923 } else if (stage == CONTROL_STAGE_DATA ) {
@@ -973,7 +973,7 @@ static int handle_video_stm_cs_req(uint8_t rhport, uint8_t stage,
973973 switch (request -> bRequest ) {
974974 case VIDEO_REQUEST_SET_CUR :
975975 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 );
977977 TU_VERIFY (tud_control_xfer (rhport , request , self -> ep_buf , sizeof (video_probe_and_commit_control_t )), VIDEO_ERROR_UNKNOWN );
978978 } else if (stage == CONTROL_STAGE_DATA ) {
979979 TU_VERIFY (_update_streaming_parameters (self , (video_probe_and_commit_control_t * )self -> ep_buf ), VIDEO_ERROR_INVALID_VALUE_WITHIN_RANGE );
0 commit comments