Fix an off-by-one error by adding proper range checks when parsing the
HDA association descriptors. This fixes a crash during device probe for some HDA PCI devices. Reported by: David Wolfskill <david@catwhisker.org> Reviewed by: mav @ MFC after: 1 week
This commit is contained in:
parent
dd1d37071a
commit
c305444c0f
@ -3203,7 +3203,7 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo)
|
||||
|
||||
/* Scan associations skipping as=0. */
|
||||
cnt = 0;
|
||||
for (j = 1; j < 16; j++) {
|
||||
for (j = 1; j < 16 && cnt < max; j++) {
|
||||
first = 16;
|
||||
hpredir = 0;
|
||||
for (i = devinfo->startnode; i < devinfo->endnode; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user