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 <da...@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++) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"