Skip to content

Commit

Permalink
added NULL check for params->deviceinfo.Model (afl)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Oct 1, 2024
1 parent 9c026d6 commit 8b8c81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camlibs/ptp2/ptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4831,7 +4831,7 @@ ptp_operation_issupported(PTPParams* params, uint16_t operation)

/* The R5m2 fails to send a PTP response packet after the data packet of the GetDeviceInfoEx.
* This seems to be firmware bug present in version 1.0.0 and 1.0.1. See #1028. */
if (operation == PTP_OC_CANON_EOS_GetDeviceInfoEx && !strcmp(params->deviceinfo.Model,"Canon EOS R5m2"))
if (operation == PTP_OC_CANON_EOS_GetDeviceInfoEx && params->deviceinfo.Model && !strcmp(params->deviceinfo.Model,"Canon EOS R5m2"))
return 0;

for (;i<params->deviceinfo.OperationsSupported_len;i++) {
Expand Down

0 comments on commit 8b8c81c

Please sign in to comment.