diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-18 12:56:46 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-18 12:56:46 +0100 |
commit | 907cc2eb616124abe41e7c1b525139a54f3cea8f (patch) | |
tree | 1b8327db28fb620acf1dbbedf46c7bac71fbad98 /src/libmime/archives.c | |
parent | 4041c2d64024f27488461e03fcd587dfbb34c4b0 (diff) | |
download | rspamd-907cc2eb616124abe41e7c1b525139a54f3cea8f.tar.gz rspamd-907cc2eb616124abe41e7c1b525139a54f3cea8f.zip |
[Minor] Fix more issues in libmime
Found by: coverity scan
Diffstat (limited to 'src/libmime/archives.c')
-rw-r--r-- | src/libmime/archives.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libmime/archives.c b/src/libmime/archives.c index 1101213d1..467f9c021 100644 --- a/src/libmime/archives.c +++ b/src/libmime/archives.c @@ -141,7 +141,7 @@ rspamd_archive_process_zip (struct rspamd_task *task, guint32 cd_offset, cd_size, comp_size, uncomp_size, processed = 0; guint16 extra_len, fname_len, comment_len; struct rspamd_archive *arch; - struct rspamd_archive_file *f; + struct rspamd_archive_file *f = NULL; /* Zip files have interesting data at the end of archive */ p = part->parsed_data.begin + part->parsed_data.len - 1; @@ -1263,6 +1263,7 @@ rspamd_7zip_read_substreams_info (struct rspamd_task *task, } folder_nstreams = g_alloca (sizeof (guint64) * num_folders); + memset (folder_nstreams, 0, sizeof (guint64) * num_folders); while (p != NULL && p < end) { /* @@ -1410,9 +1411,10 @@ rspamd_7zip_read_archive_props (struct rspamd_task *task, */ proptype = *p; - SZ_SKIP_BYTES(1); if (p != NULL) { + SZ_SKIP_BYTES(1); + while (proptype != 0) { SZ_READ_VINT(proplen); |