summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ptp-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ptp-pack.c b/src/ptp-pack.c
index 5df73d0..0616996 100644
--- a/src/ptp-pack.c
+++ b/src/ptp-pack.c
@@ -818,7 +818,7 @@ ptp_unpack_OI (PTPParams *params, unsigned char* data, PTPObjectInfo *oi, unsign
\
if (n >= UINT_MAX/sizeof(val->a.v[0])) \
return 0; \
- if (n > (total - (*offset))/sizeof(val->a.v[0]))\
+ if (n > (total - (*offset))/sizeof(val->a.v[0].member))\
return 0; \
val->a.count = n; \
val->a.v = malloc(sizeof(val->a.v[0])*n); \