diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-07-24 14:30:07 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2026-07-24 15:07:50 +0000 |
| commit | 8468152509a0dfd73e69618af2b1d7f9cbd366f7 (patch) | |
| tree | 60351e83b9b01b06f3b05b5c17a7f49f61090fab /sys | |
| parent | 26bb78b77231c4b2d80f7d89f39e9e06294151d2 (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/video/uvideo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/video/uvideo.c b/sys/dev/usb/video/uvideo.c index 7c7268454ae2..bb52232e153e 100644 --- a/sys/dev/usb/video/uvideo.c +++ b/sys/dev/usb/video/uvideo.c @@ -1744,7 +1744,7 @@ uvideo_vs_parse_desc_frame_buffer_size(struct uvideo_softc *sc, * width * height * bpp since dwMaxVideoFrameBufferSize may be wrong. */ if (desc->bDescriptorSubtype == UDESCSUB_VS_FRAME_UNCOMPRESSED) { - fbuf_size = UGETW(fd->u.uc.wWidth) * + fbuf_size = (uint64_t)UGETW(fd->u.uc.wWidth) * UGETW(fd->u.uc.wHeight) * sc->sc_fmtgrp[fmtidx].format->u.uc.bBitsPerPixel / NBBY; } else @@ -2037,6 +2037,8 @@ uvideo_vs_negotiation(struct uvideo_softc *sc, int commit) else if (frame_ival >= max) frame_ival = max; else { + if (step == 0) + step = 1; for (i = min; i + step / 2 < frame_ival; i += step) |
