diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2017-04-24 22:00:30 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2017-04-24 22:00:30 +0200 |
commit | 13007e4b4b4c0e5d9f33a71f212efcf2d46d6f8f (patch) | |
tree | 65d0c05c23a6ce4906747e118583623041d2a2e2 | |
parent | d7e20d1f58f7d7bd3e7944a0d30a15b019aa7b98 (diff) | |
download | libgphoto2-13007e4b4b4c0e5d9f33a71f212efcf2d46d6f8f.tar.gz |
initialize tmp to be NULL to avoid double free (AFL)
-rw-r--r-- | camlibs/ptp2/library.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index bc586525d..fe8b1b938 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -7477,6 +7477,7 @@ ptp_list_folder_eos (PTPParams *params, uint32_t storage, uint32_t handle) { for (k=0;k<storageids.n;k++) { GP_LOG_D ("reading handle %08x directory of 0x%08x", storageids.Storage[k], handle); + tmp = NULL; ret = LOG_ON_PTP_E (ptp_canon_eos_getobjectinfoex ( params, storageids.Storage[k], handle ? handle : 0xffffffff, 0x100000, &tmp, &nroftmp)); if (ret != PTP_RC_OK) { |