summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2017-04-23 18:51:11 +0200
committerMarcus Meissner <marcus@jet.franken.de>2017-04-23 18:55:15 +0200
commit786f2d9edfdcc4a214f026f565be79bf81a9c213 (patch)
tree9821fa6fd2a229d87386c559ebd056c43c083484
parent67a654cce097defb84e36f29474345542181b304 (diff)
downloadlibgphoto2-786f2d9edfdcc4a214f026f565be79bf81a9c213.tar.gz
do not wait 1 second while fuzzing
use a uint64_t cast, so the ricoh shutterspeed works on 32bit (hopefully)
-rw-r--r--camlibs/ptp2/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index e32138a65..437cf5d5f 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -463,7 +463,9 @@ camera_prepare_canon_eos_capture(Camera *camera, GPContext *context) {
ct_val.u16 = 0x0008;
C_PTP (ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EOS_EVFOutputDevice, &ct_val, PTP_DTC_UINT16));
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
usleep(1000*1000); /* 1 second */
+#endif
C_PTP (ptp_check_eos_events (params));
}
@@ -3786,7 +3788,7 @@ _put_Ricoh_ShutterSpeed(CONFIG_PUT_ARGS) {
return GP_ERROR;
y = 1;
}
- propval->u64 = ((unsigned long)x<<32) | y;
+ propval->u64 = ((uint64_t)x<<32) | y;
return GP_OK;
}