diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2019-04-28 08:28:45 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2019-04-28 08:28:45 +0200 |
commit | 1496b5045433881dd14a1889b26183f60a23e81f (patch) | |
tree | 93e4b114e9d5475e8fb0ea6420a2c8f5c1352830 | |
parent | 835b96d050ee514debce8e6646fcb57df90d2f40 (diff) | |
download | libgphoto2-1496b5045433881dd14a1889b26183f60a23e81f.tar.gz |
check that downloaded size meetings image expectations (AFL)
-rw-r--r-- | camlibs/aox/library.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/camlibs/aox/library.c b/camlibs/aox/library.c index 45a2559fc..c1d8515ea 100644 --- a/camlibs/aox/library.c +++ b/camlibs/aox/library.c @@ -220,6 +220,12 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, break; } if (w == 640) { + + if (len < 0x98 + w*h) { + GP_DEBUG("len %d is less than expected %d\n", len, 0x98+w*h); + return GP_ERROR; + } + /* Stripping useless header */ p_data = data + 0x98; /* Picture is mirror-imaged.*/ |