summaryrefslogtreecommitdiff
path: root/camlibs/ptp2/ptp-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'camlibs/ptp2/ptp-pack.c')
-rw-r--r--camlibs/ptp2/ptp-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
index 3eb544013..10f8bcc46 100644
--- a/camlibs/ptp2/ptp-pack.c
+++ b/camlibs/ptp2/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 = calloc(sizeof(val->a.v[0]),n); \