mirror of https://github.com/Cisco-Talos/clamav
Fixed the following Coverity issues: - 225236 - In cli_egg_extract_file: Dereference of an explicit null value (CWE-476). The first fail case checked handle for NULL and then dereferenced it in the done block - 225209 - In executeIfNewVersion: Leak of memory or pointers to system resources (CWE-404). modifiedCommand was defined twice, with the inner instance being assigned to and the outer instance being freed - 225201 - In regex_list_match: Code can never be reached because of a logical contradiction (CWE-561). The code had logic off to the side that may have been missed: filter_search_rc = filter_search(&matcher->filter, (const unsigned char *)bufrev, buffer_len) != -1; if (filter_search_rc == -1) { - 225198 - In phishingCheck: Leak of memory or pointers to system resources (CWE-404). A fail case caused by malloc failing would leak previously allocated memory. - 225197 - In updatecustomdb: A pointer to freed memory is dereferenced, used as a function argument, or otherwise used (CWE-416). In a fail case, a pointer was freed and then used in a debug print statement - 225190 - In updatedb: A pointer to freed memory is dereferenced, used as a function argument, or otherwise used (CWE-416). In a fail case, a pointer was freed and then used in a debug print statement - 225195 - In cli_egg_open: The sizeof operator is used on a wrong argument that incidentally has the same size (CWE-467). sizeof(char **) was being used instead of sizeof(char *) - 225193 - In egg_parse_comment_header: Code can never be reached because of a logical contradiction (CWE-561). A cleanup case for variable comment was unnecessary, and to fix comment was removed entirely. - 225147 - In get_server_node: Code can never be reached because of a logical contradiction (CWE-561). A cleanup case for variable url was unnecessary - 225168 - In download_complete_callback: Missing break statement between cases in switch statement (CWE-484). In the case where forking failed, freshclam would check the database without forking but then continue on to execute the code intended to be done in the child process because of a missing break statement - 225152 - In cli_egg_lzma_decompress: Use of an uninitialized variable (CWE-457). Certain fail cases would call cli_LzmaShutdown on an uninitialized stream. Now it’s only called after initialization occurs.pull/130/head
parent
1d66184a7d
commit
2429b8dfa7
Loading…
Reference in new issue