From a75673692ba904ac2e292dc3b80c714dbe44d76a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 24 May 2020 10:23:50 +0200 Subject: also add xlen 0 condition to eos reader --- camlibs/ptp2/library.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index b0007c596..a76665f35 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -7942,6 +7942,10 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, free (ximage); ximage = NULL; offset += xsize; + if (!xsize) { + GP_LOG_E ("getpartialobject loop: offset=%d, size is %d, xlen returned is 0?", offset, size); + break; + } } goto done; } -- cgit v1.2.1