[Bug 262671] Kernel panics after a invalid SNDCTL_MIXERINFO ioctl

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 21 Mar 2022 16:13:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262671

--- Comment #9 from Ed Maste <emaste@freebsd.org> ---
(In reply to Aleksander Slomka from comment #8)

Indeed; trying successive mi.dev values here is fine:

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/soundcard.h>
#include <unistd.h>

int
main()
{
        int fd;
        fd = open("/dev/mixer", O_RDWR);
        oss_mixerinfo mi;

        for (mi.dev = 0; mi.dev < 100; mi.dev++)
                ioctl(fd, SNDCTL_MIXERINFO, &mi);
        return (0);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.