[aravis] gvcp: limit read memory size to 16 bit values.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gvcp: limit read memory size to 16 bit values.
- Date: Wed, 2 Jun 2010 14:18:31 +0000 (UTC)
commit 796e29874efda810d973a075bc8981f635bd5e13
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Wed Jun 2 16:16:11 2010 +0200
gvcp: limit read memory size to 16 bit values.
src/arvgvcp.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/arvgvcp.h b/src/arvgvcp.h
index 918d27e..a51b558 100644
--- a/src/arvgvcp.h
+++ b/src/arvgvcp.h
@@ -143,7 +143,8 @@ arv_gvcp_packet_get_read_memory_cmd_infos (const ArvGvcpPacket *packet, guint32
if (address != NULL)
*address = g_ntohl (*((guint32 *) ((void *) packet + sizeof (ArvGvcpPacket))));
if (size != NULL)
- *size = g_ntohl (*((guint32 *) ((void *) packet + sizeof (ArvGvcpPacket) + sizeof (guint32))));
+ *size = (g_ntohl (*((guint32 *) ((void *) packet + sizeof (ArvGvcpPacket) + sizeof (guint32))))) &
+ 0xffff;
}
static inline size_t
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]