Wow, this is clearly wrong (found in esa_set_params):
if (p->channels < 1 && p->channels > 2) return EINVAL; Change the 'and' to an 'or' so the check actually does something.
This commit is contained in:
parent
2b6672222b
commit
4b8daa06de
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: esa.c,v 1.29 2005/06/28 00:28:42 thorpej Exp $ */
|
/* $NetBSD: esa.c,v 1.30 2005/10/29 17:44:34 jmcneill Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2002 Jared D. McNeill <jmcneill@invisible.ca>
|
* Copyright (c) 2001, 2002 Jared D. McNeill <jmcneill@invisible.ca>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.29 2005/06/28 00:28:42 thorpej Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.30 2005/10/29 17:44:34 jmcneill Exp $");
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
@ -279,7 +279,7 @@ esa_set_params(void *hdl, int setmode, int usemode,
|
||||||
if (p->sample_rate < ESA_MINRATE ||
|
if (p->sample_rate < ESA_MINRATE ||
|
||||||
p->sample_rate > ESA_MAXRATE ||
|
p->sample_rate > ESA_MAXRATE ||
|
||||||
(p->precision != 8 && p->precision != 16) ||
|
(p->precision != 8 && p->precision != 16) ||
|
||||||
(p->channels < 1 && p->channels > 2))
|
(p->channels < 1 || p->channels > 2))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
i = auconv_set_converter(esa_formats, ESA_NFORMATS,
|
i = auconv_set_converter(esa_formats, ESA_NFORMATS,
|
||||||
|
|
Loading…
Reference in New Issue