From 40cf5c9507ec6cae4005ee0186475f901e2dc7dd Mon Sep 17 00:00:00 2001 From: Liu Jinchang Date: Mon, 27 Apr 2026 14:00:56 +0800 Subject: [PATCH] Fixed CHDK Live View Bitmap Desc Memset Target (Copy-Paste Bug) In chdk_camera_capture_preview(), the memset for bmd was incorrectly using &vpd as the target, leaving bmd uninitialized with stack garbage. This is a copy-paste error from the memset line above for vpd. --- camlibs/ptp2/chdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c index 2646c3ba0..22da12a37 100644 --- a/camlibs/ptp2/chdk.c +++ b/camlibs/ptp2/chdk.c @@ -1335,7 +1335,7 @@ chdk_camera_capture_preview (Camera *camera, CameraFile *file, GPContext *contex memset (&header, 0, sizeof (header)); memset (&vpd, 0, sizeof (vpd)); - memset (&vpd, 0, sizeof (bmd)); + memset (&bmd, 0, sizeof (bmd)); CR (camera_prepare_chdk_capture (camera, context)); C_PTP_REP_MSG (ptp_chdk_get_live_data (params, flags, &data, &size),