mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Change check order to avoid array overrun.
Found with: Coverity Prevent(tm) CID: 2497
This commit is contained in:
parent
ebd4055a33
commit
d7b96565f5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185176
@ -83,7 +83,7 @@
|
||||
|
||||
#include "mixer_if.h"
|
||||
|
||||
#define HDA_DRV_TEST_REV "20081115_0116"
|
||||
#define HDA_DRV_TEST_REV "20081122_0117"
|
||||
|
||||
SND_DECLARE_FILE("$FreeBSD$");
|
||||
|
||||
@ -4762,7 +4762,7 @@ hdac_audio_trace_as_out(struct hdac_devinfo *devinfo, int as, int seq)
|
||||
nid_t min, res;
|
||||
|
||||
/* Find next pin */
|
||||
for (i = seq; ases[as].pins[i] == 0 && i < 16; i++)
|
||||
for (i = seq; i < 16 && ases[as].pins[i] == 0; i++)
|
||||
;
|
||||
/* Check if there is no any left. If so - we succeded. */
|
||||
if (i == 16)
|
||||
|
Loading…
Reference in New Issue
Block a user