HomeFreeBSD

sound: Add min_rate and min_channels safety check in SNDCTL_AUDIOINFO

Description

sound: Add min_rate and min_channels safety check in SNDCTL_AUDIOINFO

If the channel list is empty, min_rate and min_channels will be INT_MAX.
Instead, assign them to 0, like we do in sndstat_get_caps().

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45876

Details

Provenance
christosAuthored on Jul 6 2024, 6:23 PM
Reviewer
dev_submerge.ch
Differential Revision
D45876: sound: Add min_rate and min_channels safety check in SNDCTL_AUDIOINFO
Parents
rG9d8b93bc9cce: sound: Refactor sndstat_get_caps()
Branches
Unknown
Tags
Unknown