diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2014-03-23 15:32:22 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2014-03-23 15:32:22 +0000 |
commit | 9e5eeb114e76b681e56e5493e9bccba5d560d8f6 (patch) | |
tree | 0c4195a1a5310235d7d6ccbc1006f3f29142a734 | |
parent | 272af28c9fa05c6a5b324565ed54c87ec87ba043 (diff) | |
download | libgphoto2-9e5eeb114e76b681e56e5493e9bccba5d560d8f6.tar.gz |
fixed sizeof for allocation in propdesc duplicator
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14845 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | camlibs/ptp2/ptp-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c index 2a9cecec1..272d0f580 100644 --- a/camlibs/ptp2/ptp-pack.c +++ b/camlibs/ptp2/ptp-pack.c @@ -942,7 +942,7 @@ duplicate_PropertyValue (const PTPPropertyValue *src, PTPPropertyValue *dst, uin unsigned int i; dst->a.count = src->a.count; - dst->a.v = malloc (sizeof(src->a.v)*src->a.count); + dst->a.v = malloc (sizeof(src->a.v[0])*src->a.count); for (i=0;i<src->a.count;i++) duplicate_PropertyValue (&src->a.v[i], &dst->a.v[i], type & ~PTP_DTC_ARRAY_MASK); return; |