diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-01-26 10:47:23 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-01-26 10:47:23 +0100 |
commit | 6cefcfadcc9a1c572185a033e65cd9d55d4c2bb1 (patch) | |
tree | c858a9ac9db8ffe3bd3390fc6fcacc6811e0b203 /camlibs/clicksmart310 | |
parent | 47e19d65d75f8b900fc663430bbe6dcacef6e2a0 (diff) | |
download | libgphoto2-6cefcfadcc9a1c572185a033e65cd9d55d4c2bb1.tar.gz |
avoid endless loops on detaching devices (AFL)
Diffstat (limited to 'camlibs/clicksmart310')
-rw-r--r-- | camlibs/clicksmart310/clicksmart.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/camlibs/clicksmart310/clicksmart.c b/camlibs/clicksmart310/clicksmart.c index 7ee867dcb..f09e98064 100644 --- a/camlibs/clicksmart310/clicksmart.c +++ b/camlibs/clicksmart310/clicksmart.c @@ -149,7 +149,9 @@ clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port, gp_port_usb_msg_interface_write(port, 6, 0x1fff - n, 1, NULL, 0); c = 0; while (c != 1){ - CLICKSMART_READ_STATUS (port, &c); + int r; + if ((r = CLICKSMART_READ_STATUS (port, &c)) < GP_OK) + return r; } /* Get the size of the data and calculate the size to download, which * is the next multiple of 0x100. Only for the hi-res photos is the |