Date: Wed, 27 May 2015 13:25:26 +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-9@freebsd.org Subject: svn commit: r283610 - stable/9/sys/dev/sound/pci/hda Message-ID: <201505271325.t4RDPQ5d089180@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505271325.t4RDPQ5d089180>