Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Nov 2008 18:07:51 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 153699 for review
Message-ID:  <200811281807.mASI7pL5071780@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153699

Change 153699 by hselasky@hselasky_laptop001 on 2008/11/28 18:07:44

	
	Fix errornous parsing of USB audio mixer data.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#21 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#21 (text+ko) ====

@@ -2656,7 +2656,10 @@
 		DPRINTF("invalid Audio Control header\n");
 		goto done;
 	}
-	wTotalLen = UGETW(cd->wTotalLength);
+	/* "wTotalLen" is allowed to be corrupt */
+	wTotalLen = UGETW(acdp->wTotalLength) - acdp->bLength;
+
+	/* get USB audio revision */
 	sc->sc_audio_rev = UGETW(acdp->bcdADC);
 
 	DPRINTFN(3, "found AC header, vers=%03x, len=%d\n",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811281807.mASI7pL5071780>