ptp_unpack_CANON_changes: fix bug in bounds checking code

This commit is contained in:
axxel
2024-09-23 11:53:05 +02:00
committed by Marcus Meissner
parent 4d6f9b664d
commit 6177718525

View File

@@ -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;