diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-05-27 13:23:02 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-05-27 13:23:02 +0000 |
commit | 1f42ff868ac506ba941c51b42ea286b30e31add8 (patch) | |
tree | 65d8be4da96a9693e38281187b01dcdc2ce15f03 /sys/dev/sound | |
parent | 3162ff437e3400b7d8ed50f5e4cddf298e374c84 (diff) | |
download | FreeBSD-src-1f42ff868ac506ba941c51b42ea286b30e31add8.zip FreeBSD-src-1f42ff868ac506ba941c51b42ea286b30e31add8.tar.gz |
MFC r283064:
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.
Diffstat (limited to 'sys/dev/sound')
-rw-r--r-- | sys/dev/sound/pci/hda/hdaa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 0d2ae47..fe45343 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -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++) { |