* [Qemu-devel] qemu/usb-uhci: Data buffer is too small
@ 2006-11-30 5:41 Herbert Xu
2007-01-17 10:08 ` Aurelien Jarno
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2006-11-30 5:41 UTC (permalink / raw)
To: qemu-devel, Xen Development Mailing List, Keir Fraser
Hi:
[QEMU] usb-uhci: Data buffer is too small
The data buffer is only 1280 bytes long but the user-supplied length
can be as large as 0x7ff. This patch extends the buffer to 2048
bytes.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r 463bda167715 tools/ioemu/hw/usb-uhci.c
--- a/tools/ioemu/hw/usb-uhci.c Wed Nov 29 12:43:11 2006 +0000
+++ b/tools/ioemu/hw/usb-uhci.c Thu Nov 30 16:38:40 2006 +1100
@@ -421,7 +421,7 @@ static int uhci_handle_td(UHCIState *s,
static int uhci_handle_td(UHCIState *s, UHCI_TD *td, int *int_mask)
{
uint8_t pid;
- uint8_t buf[1280];
+ uint8_t buf[2048];
int len, max_len, err, ret;
if (td->ctrl & TD_CTRL_IOC) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] qemu/usb-uhci: Data buffer is too small
2006-11-30 5:41 [Qemu-devel] qemu/usb-uhci: Data buffer is too small Herbert Xu
@ 2007-01-17 10:08 ` Aurelien Jarno
2007-01-17 11:43 ` [Xen-devel] " Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2007-01-17 10:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Xen Development Mailing List, Keir Fraser
On Thu, Nov 30, 2006 at 04:41:41PM +1100, Herbert Xu wrote:
> Hi:
>
> [QEMU] usb-uhci: Data buffer is too small
>
> The data buffer is only 1280 bytes long but the user-supplied length
> can be as large as 0x7ff. This patch extends the buffer to 2048
> bytes.
>
This patch does not apply to the current CVS, as the variable buf has
been moved into a structure. If the problem is still there, I guess the
patch below should be applied instead.
Index: hw/usb-uhci.c
===================================================================
RCS file: /sources/qemu/qemu/hw/usb-uhci.c,v
retrieving revision 1.12
diff -u -d -p -r1.12 usb-uhci.c
--- hw/usb-uhci.c 12 Aug 2006 01:04:27 -0000 1.12
+++ hw/usb-uhci.c 17 Jan 2007 10:06:16 -0000
@@ -87,7 +87,7 @@ typedef struct UHCIState {
is to allow multiple pending requests. */
uint32_t async_qh;
USBPacket usb_packet;
- uint8_t usb_buf[1280];
+ uint8_t usb_buf[2048];
} UHCIState;
typedef struct UHCI_TD {
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-17 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-30 5:41 [Qemu-devel] qemu/usb-uhci: Data buffer is too small Herbert Xu
2007-01-17 10:08 ` Aurelien Jarno
2007-01-17 11:43 ` [Xen-devel] " Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).