Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2015 13:23:03 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r283609 - stable/10/sys/dev/sound/pci/hda
Message-ID:  <201505271323.t4RDN38U088767@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed May 27 13:23:02 2015
New Revision: 283609
URL: https://svnweb.freebsd.org/changeset/base/283609

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/10/sys/dev/sound/pci/hda/hdaa.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- stable/10/sys/dev/sound/pci/hda/hdaa.c	Wed May 27 12:58:22 2015	(r283608)
+++ stable/10/sys/dev/sound/pci/hda/hdaa.c	Wed May 27 13:23:02 2015	(r283609)
@@ -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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505271323.t4RDN38U088767>