Date: Mon, 18 May 2015 16:02:45 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283064 - head/sys/dev/sound/pci/hda Message-ID: <201505181602.t4IG2jSq077902@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505181602.t4IG2jSq077902>