svn commit: r283610 - stable/9/sys/dev/sound/pci/hda

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 27 13:25:27 UTC 2015


Author: hselasky
Date: Wed May 27 13:25:26 2015
New Revision: 283610
URL: https://svnweb.freebsd.org/changeset/base/283610

Log:
  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.

Modified:
  stable/9/sys/dev/sound/pci/hda/hdaa.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdaa.c	Wed May 27 13:23:02 2015	(r283609)
+++ stable/9/sys/dev/sound/pci/hda/hdaa.c	Wed May 27 13:25:26 2015	(r283610)
@@ -2809,7 +2809,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