summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2020-02-01 09:16:14 +0100
committerMarcus Meissner <marcus@jet.franken.de>2020-02-01 09:16:14 +0100
commitd6cc507620917cb89c3d0e595d76e80da83926fd (patch)
tree779c94ab4e7e5985838e31af14b2ddc72f07d516
parentff0fc4325178c5e28f55ad1f7d9fa8f0737dd640 (diff)
downloadlibgphoto2-d6cc507620917cb89c3d0e595d76e80da83926fd.tar.gz
avoid usleep during fuzzing (AFL)
-rw-r--r--camlibs/toshiba/pdrm11/pdrm11.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/camlibs/toshiba/pdrm11/pdrm11.c b/camlibs/toshiba/pdrm11/pdrm11.c
index 965d4fcd5..8fb7f2a54 100644
--- a/camlibs/toshiba/pdrm11/pdrm11.c
+++ b/camlibs/toshiba/pdrm11/pdrm11.c
@@ -30,6 +30,11 @@
#define GP_MODULE "pdrm11"
#define ETIMEDOUT 110
+/* do not sleep during fuzzing */
+#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define usleep(x)
+#endif
+
static int pdrm11_select_file(GPPort *port, uint16_t file);
int pdrm11_init(GPPort *port)