svn commit: r283064 - head/sys/dev/sound/pci/hda
Hans Petter Selasky
hselasky at FreeBSD.org
Mon May 18 16:02:45 UTC 2015
Author: hselasky
Date: Mon May 18 16:02:44 2015
New Revision: 283064
URL: https://svnweb.freebsd.org/changeset/base/283064
Log:
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 at catwhisker.org>
Reviewed by: mav @
MFC after: 1 week
Modified:
head/sys/dev/sound/pci/hda/hdaa.c
Modified: head/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa.c Mon May 18 15:51:27 2015 (r283063)
+++ head/sys/dev/sound/pci/hda/hdaa.c Mon May 18 16:02:44 2015 (r283064)
@@ -3203,7 +3203,7 @@ hdaa_audio_as_parse(struct hdaa_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++) {
More information about the svn-src-all
mailing list