diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-05-24 10:20:11 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-05-24 10:21:17 +0200 |
commit | 691514583444d71c25ddd7b380dc1048c808039a (patch) | |
tree | 357e30bd23697f550499fa96ac623503c79b81a0 | |
parent | 78299f03c7bf2a6a031e23ad10960880ac1abcf8 (diff) | |
download | libgphoto2-691514583444d71c25ddd7b380dc1048c808039a.tar.gz |
if the partialobject loop does not make progress (xlen = 0), leave it
https://github.com/gphoto/libgphoto2/issues/487
-rw-r--r-- | camlibs/ptp2/library.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 8ff3d0952..b0007c596 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -7917,6 +7917,10 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, free (ximage); ximage = NULL; offset += xlen; + if (!xlen) { + GP_LOG_E ("getpartialobject loop: offset=%d, size is %d, xlen returned is 0?", offset, size); + break; + } } goto done; } |