svn commit: r298657 - head/sys/dev/sound/pci

Conrad E. Meyer cem at FreeBSD.org
Tue Apr 26 18:20:42 UTC 2016


Author: cem
Date: Tue Apr 26 18:20:41 2016
New Revision: 298657
URL: https://svnweb.freebsd.org/changeset/base/298657

Log:
  emu10kx: Don't iterate beyond array bounds
  
  Reported by:	Coverity
  CID:		1354978
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/dev/sound/pci/emu10kx.c

Modified: head/sys/dev/sound/pci/emu10kx.c
==============================================================================
--- head/sys/dev/sound/pci/emu10kx.c	Tue Apr 26 18:17:44 2016	(r298656)
+++ head/sys/dev/sound/pci/emu10kx.c	Tue Apr 26 18:20:41 2016	(r298657)
@@ -587,7 +587,7 @@ emu_getcard(device_t dev)
 		}
 	}
 
-	for (i = 0; i < nitems(emu_cards); i++) {
+	for (i = 0; i < nitems(emu_bad_cards); i++) {
 		if (device == emu_bad_cards[i].device) {
 			if (subdevice == emu_bad_cards[i].subdevice) {
 				thiscard = 0;


More information about the svn-src-all mailing list