From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 03/10] usb: mtp: fix usb_mtp_add_u64
Date: Mon, 5 May 2014 13:12:32 +0200 [thread overview]
Message-ID: <1399288360-29897-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1399288360-29897-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/usb/dev-mtp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 17df447..063a426 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -416,7 +416,7 @@ static void usb_mtp_add_u32(MTPData *data, uint32_t val)
static void usb_mtp_add_u64(MTPData *data, uint64_t val)
{
- usb_mtp_realloc(data, 4);
+ usb_mtp_realloc(data, 8);
data->data[data->length++] = (val >> 0) & 0xff;
data->data[data->length++] = (val >> 8) & 0xff;
data->data[data->length++] = (val >> 16) & 0xff;
@@ -424,7 +424,7 @@ static void usb_mtp_add_u64(MTPData *data, uint64_t val)
data->data[data->length++] = (val >> 32) & 0xff;
data->data[data->length++] = (val >> 40) & 0xff;
data->data[data->length++] = (val >> 48) & 0xff;
- data->data[data->length++] = (val >> 54) & 0xff;
+ data->data[data->length++] = (val >> 56) & 0xff;
}
static void usb_mtp_add_u16_array(MTPData *data, uint32_t len,
--
1.8.3.1
next prev parent reply other threads:[~2014-05-05 11:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 11:12 [Qemu-devel] [PULL 00/10] usb patch queue Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 01/10] usb-ohci: Add vmstate descriptor Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 02/10] usb: mtp: replace debug printfs with trace points Gerd Hoffmann
2014-05-05 11:12 ` Gerd Hoffmann [this message]
2014-05-05 11:12 ` [Qemu-devel] [PULL 04/10] usb: mtp: fix version (is decimal not bcd) Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 05/10] usb: mtp: fix serial (must be exact 32 chars) Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 06/10] usb: mtp: fix error path memory leak Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 07/10] usb: mtp: avoid empty description string Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 08/10] usb: mtp: drop data-out hexdump Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 09/10] usb: mtp: fix possible buffer overflow Gerd Hoffmann
2014-05-05 11:12 ` [Qemu-devel] [PULL 10/10] usb: mtp: reply INCOMPLETE_TRANSFER on read errors Gerd Hoffmann
2014-05-07 12:36 ` [Qemu-devel] [PULL 00/10] usb patch queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399288360-29897-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).