Skip to content

media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-check_aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: aarch64 CI
on:
pull_request_target:
pull_request:
branches:
- '**'
- '!mainline'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-check_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: x86_64 CI
on:
pull_request_target:
pull_request:
branches:
- '**'
- '!mainline'
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/usb/uvc/uvc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static int uvc_parse_format(struct uvc_device *dev,
* Parse the frame descriptors. Only uncompressed, MJPEG and frame
* based formats have frame descriptors.
*/
while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
while (ftype && buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
buffer[2] == ftype) {
frame = &format->frame[format->nframes];
if (ftype != UVC_VS_FRAME_FRAME_BASED)
Expand Down