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

Pedro Giffuni pfg at FreeBSD.org
Tue Apr 26 18:38:01 UTC 2016



On 04/26/16 13:20, Conrad E. Meyer wrote:
> 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;
>

Hmm sadly interesting.
This was not a script or an old bug; it was pilot error.

Pointyhat:	pfg

Thanks!



More information about the svn-src-all mailing list