clamav/unit_tests
Andrew 319bfb51a5 Fix several coverity warnings
290424 Missing break in switch - In hash_match: Missing break
statement between cases in switch statement

290414 Resource leak - In cli_scanishield_msi: Leak of memory or
pointers to system resources. Memory leak in a fail case

288197 Resource leak - In decrypt_any: Leak of memory or pointers
to system resources. Memory leak in a fail case

290426 Resource leak - In cli_magic_scan: Leak of memory or pointers
to system resources. Leaked a file prefix when running with
--save-temps

192923 Resource leak - In cli_scanrar: Leak of memory or pointers to
system resources. Leaked a file descriptor if a virus was found in
a RAR file comment

225146 Resource leak - In cli_scanegg: Leak of memory or pointers
to system resources. Leaked a file descriptor if unable to write
a comment file to disk

290425 Resource leak - In scan_common: Leak of memory or pointers
to system resources. Memory leaks in various fail cases.

Also changes cli_scanrar to write out the file comment only if
--leave-temps is specified and scan the buffer (like what is done
in cli_scanegg) instead of writing the file out, scanning that,
and then deleting the file if --leave-temps is not specified.

The unit tests stopped working when correcting an issue with a
switch statement that determined what type of signature had matched
on a Google SafeBrowsing GDB rule. Looking into the unit tests, it
looks like the code had always assumed that the test cases would be
detected by a malware test rule in unit_tests/input/daily.gdb, but
now some of the tests get matched on the phishing test rule.
I updated the test logic to be more clear, and added tests for both
cases now.

Fix some memory leaks in libclamav/scanners.c
2020-07-15 08:39:32 -07:00
..
.split clamd, clamscan, libclamav: new option HeuristicScanPrecedence (bb #649) 2008-07-31 10:51:46 +00:00
input Fix several coverity warnings 2020-07-15 08:39:32 -07:00
.gitignore add unit_test/.gitignore 2009-09-24 17:22:25 +02:00
buf.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
buf.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
check1_clamscan.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check2_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check3_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check4_clamd.sh Use automake's parallel tests feature. 2009-09-14 19:02:50 +03:00
check5_clamd_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check6_clamd_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check7_clamd_hg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check8_clamd_hg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check9_clamscan_vg.sh Fix valgrind tests. 2010-09-28 13:46:33 +03:00
check_bytecode.c Record names of extracted files 2020-06-03 10:39:18 -04:00
check_clamav.c libclamav: Fix fmap leak in bytecode runtime 2020-04-20 11:26:43 -07:00
check_clamav_skip.c Finish phase 1 of silencing compiler warnings 2014-07-11 09:30:58 -04:00
check_clamd.c Check test support for check 0.13 2020-01-15 08:14:23 -08:00
check_common.sh bb10979: clamd multi-threaded database reload 2020-07-01 22:06:15 -07:00
check_disasm.c Check test support for check 0.13 2020-01-15 08:14:23 -08:00
check_fpu_endian.c Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
check_freshclam.sh add unit tests for binaries 2008-07-10 17:08:41 +00:00
check_htmlnorm.c Record names of extracted files 2020-06-03 10:39:18 -04:00
check_jsnorm.c Check test support for check 0.13 2020-01-15 08:14:23 -08:00
check_matchers.c Rename core scanning functions 2020-06-03 11:00:40 -04:00
check_regex.c Fix several coverity warnings 2020-07-15 08:39:32 -07:00
check_sigtool.sh add unit tests for binaries 2008-07-10 17:08:41 +00:00
check_str.c XLM (Excel 4.0) macro detection and extraction 2020-04-29 14:19:41 -07:00
check_uniq.c Check test support for check 0.13 2020-01-15 08:14:23 -08:00
check_unit_vg.sh Fix unit test script. 2010-03-24 16:46:21 +02:00
checks.h bytecode: add unit tests and ChangeLog. 2009-07-13 19:40:25 +03:00
checks_common.h Check test support for check 0.13 2020-01-15 08:14:23 -08:00
duma_tests.sh disable duma tests by default, they time out even on fast machines. 2009-02-25 20:41:16 +00:00
efence_tests.sh set EF_ALIGNMENT=8 for non-x86 platforms. (bb #1385) 2009-05-06 07:56:41 +00:00
encode.js.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
encode.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
js.js.ref Revert "follow-up bb#11217 - fixed html normalization" 2014-12-09 10:57:53 -05:00
js.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
Makefile.am Passes openssl location to make check. 2019-10-02 16:08:29 -04:00
Makefile.in autojunk'd 2019-11-06 09:50:38 -08:00
preload_run.sh Allow ulimit to fail (bb #2301). 2010-10-18 12:55:20 +03:00
test-freshclam.conf we need a config file for freshclam just to test -V, use a minimal one. 2008-10-29 19:06:27 +00:00
test.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
test.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
urls.nocomment.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
urls.notags.ref add htmlnorm unit tests and fix jsnorm space normalization 2008-09-23 20:52:22 +00:00
valgrind.supp bb10979: clamd multi-threaded database reload 2020-07-01 22:06:15 -07:00
valgrind_tests.sh Converting http urls to https urls. Primary focus was on clamav.net urls. I updated a couple others and fixes a few broken links as well. There are many (non-clamav.net) urls I didn't address, especially in 3rd party or contrib code. 2018-04-02 07:58:33 -04:00
virusaction-test.sh unit_tests/virusaction-test.sh: ignore pathnames (bb#1274) 2008-11-05 18:25:02 +00:00