From 5c8da2d41bd3a8ee94117c4443703a4b5e90a650 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 12 Nov 2024 12:05:34 +0100 Subject: [PATCH] Init objectinfo, as otherwise we might have lingering uninit data. https://github.com/gphoto/libgphoto2/issues/1058 --- camlibs/ptp2/library.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 28cb29825..e82fb6373 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -4879,6 +4879,7 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat struct timeval event_start; int ret; + memset(&oi,0,sizeof(oi)); if (params->deviceinfo.Model && ( !strcmp(params->deviceinfo.Model, "ZV-E10") || !strcmp(params->deviceinfo.Model, "ZV-1") || @@ -5059,6 +5060,7 @@ camera_sony_qx_capture (Camera *camera, CameraCaptureType type, CameraFilePath * C_PTP (ptp_generic_getdevicepropdesc (params, PTP_DPC_SONY_QX_OperatingMode, &dpd)); + memset(&oi,0,sizeof(oi)); while (dpd.CurrentValue.u8 != 2) { propval.u8 = 2; /* 2 is Still Capture */ C_PTP (ptp_sony_qx_setdevicecontrolvaluea (params, PTP_DPC_SONY_QX_OperatingMode, &propval, PTP_DTC_UINT8));