diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2014-01-06 13:38:04 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2014-01-06 13:38:04 +0000 |
commit | 28948bd7cfeab2e0b96944afc90017de06b7adde (patch) | |
tree | 9fe3b63f26730619d731e91132f56a0f0aa17a5a | |
parent | dc7c343bba7a291ed6e330f8bfb1de960645f703 (diff) | |
download | libgphoto2-28948bd7cfeab2e0b96944afc90017de06b7adde.tar.gz |
check size for error return (Coverity)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14666 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | camlibs/sonix/library.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camlibs/sonix/library.c b/camlibs/sonix/library.c index 886373f31..29b1cf312 100644 --- a/camlibs/sonix/library.c +++ b/camlibs/sonix/library.c @@ -240,6 +240,8 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, GP_DEBUG( "avitype is %d\n", avitype); GP_DEBUG ("height of picture %i is %i\n", k+1,h); rawsize = sonix_read_data_size (camera->port, k); + if (rawsize < GP_OK) + return rawsize; GP_DEBUG("rawsize = 0x%x = %i\n", rawsize, rawsize); if(rawsize%0x40) buffersize = rawsize - (rawsize%0x40) + 0x40; |