* libclamav/chmunpack.c: Fix possible memory leak (TK)

* libclamav/vba_extract.c: Fix zero allocation warning.


git-svn: trunk@1680
remotes/push_mirror/metadata
Trog 20 years ago
parent b57b4c367b
commit 8bf5929eb3
  1. 6
      clamav-devel/ChangeLog
  2. 3
      clamav-devel/libclamav/chmunpack.c
  3. 4
      clamav-devel/libclamav/vba_extract.c

@ -1,3 +1,9 @@
Wed Aug 3 09:56:33 BST 2005 (trog)
-----------------------------------
* libclamav/chmunpack.c: Fix possible memory leak (TK)
* libclamav/vba_extract.c: Fix zero allocation warning.
Wed Aug 3 04:57:36 CEST 2005 (tk)
----------------------------------
* freshclam: add new option --on-update-execute (OnUpdateExecute). Requested

@ -482,12 +482,11 @@ static int read_chunk_entries(unsigned char *chunk, uint32_t chunk_len,
name_len = read_enc_int(&current, end);
if (name_len > 0xFFFFFF) {
cli_dbgmsg("CHM file name too long: %llu\n", name_len);
file_e->name = (unsigned char *) cli_malloc(10);
file_e->name = (unsigned char *) strdup("truncated");
if (!file_e->name) {
free(file_e);
return FALSE;
}
file_e->name = strdup("truncated");
} else {
file_e->name = (unsigned char *) cli_malloc(name_len+1);
if (!file_e->name) {

@ -451,6 +451,10 @@ vba_project_t *vba56_dir_read(const char *dir)
}
record_count = vba_endian_convert_16(record_count, is_mac);
cli_dbgmsg("\nVBA Record count: %d\n", record_count);
if (record_count == 0) {
close(fd);
return NULL;
}
if (record_count > 1000) {
/* Almost certainly an error */
cli_dbgmsg("\nVBA Record count too big");

Loading…
Cancel
Save