summaryrefslogtreecommitdiff
path: root/camlibs/pccam600
diff options
context:
space:
mode:
authorIngvar Stepanyan <me@rreverser.com>2022-09-26 08:07:17 +0100
committerGitHub <noreply@github.com>2022-09-26 09:07:17 +0200
commite465cb4ac861ad9f0b9886a18576d6e0d43c950f (patch)
tree6ab2907ffc6ff635a5d647669a7d7285c80f51a8 /camlibs/pccam600
parent0a87bb875fc4fbbce118c2d986be2b0d63f9f7cc (diff)
downloadlibgphoto2-e465cb4ac861ad9f0b9886a18576d6e0d43c950f.tar.gz
Zero-fill CameraFileInfo (#838)
I've noticed in my tests that for many files the CameraFileInfo incorrectly had `info.audio` marked as available (with various flags). Thanks to valgrind I found that it's because `CameraFileInfo` is zero-filled in some places, but not others, so the `audio.fields` (as well as entire `audio`) was filled with uninitialized data. I tried to find all usages of `info.file.fields = ...` and `info.preview.fields = ...` and zero-initialize them in the same way as it already is in other places.
Diffstat (limited to 'camlibs/pccam600')
-rw-r--r--camlibs/pccam600/library.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/camlibs/pccam600/library.c b/camlibs/pccam600/library.c
index 33b30c9af..e9e04ff8a 100644
--- a/camlibs/pccam600/library.c
+++ b/camlibs/pccam600/library.c
@@ -119,7 +119,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
if( !((file_entry->state & 0x02) != 2) &&
!((file_entry->state & 0x08) == 8) )
{
- info.file.fields = 0;
+ memset (&info, 0, sizeof (info));
temp = (char *)&(file_entry->name)[5];
if (strncmp(temp,"JPG",3) == 0)
{