From 6177718525ae4a7e4ff4d7afaae67d50278693cc Mon Sep 17 00:00:00 2001 From: axxel Date: Mon, 23 Sep 2024 11:53:05 +0200 Subject: [PATCH] ptp_unpack_CANON_changes: fix bug in bounds checking code --- camlibs/ptp2/ptp-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c index 5c17f65b1..405c2ec69 100644 --- a/camlibs/ptp2/ptp-pack.c +++ b/camlibs/ptp2/ptp-pack.c @@ -2568,7 +2568,7 @@ ptp_unpack_CANON_changes (PTPParams *params, const unsigned char* data, unsigned dpd->DataType = PTP_DTC_STR; free (dpd->FactoryDefaultValue.str); free (dpd->CurrentValue.str); - dpd->FactoryDefaultValue.str = ptp_unpack_EOS_FocusInfoEx( params, &xdata, size ); + dpd->FactoryDefaultValue.str = ptp_unpack_EOS_FocusInfoEx( params, &xdata, xsize ); dpd->CurrentValue.str = strdup( (char*)dpd->FactoryDefaultValue.str ); ptp_debug (params," value of %x is %s", proptype, dpd->CurrentValue.str); break;