Commit graph

25 commits

Author SHA1 Message Date
Val Snyder
7ff29b8c37
Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Micah Snyder
9cb28e51e6 Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Micah Snyder
6eebecc303 Bump copyright for 2023 2023-02-12 11:20:22 -08:00
Micah Snyder
6e8b2abd11 Fix additional invalid prototypes 2022-11-22 23:22:57 -08:00
Micah Snyder
57886cee52 Code cleanup: More accurate variable types in bytecode modules
The bytecode source files largely use `int` instead of the appropriate
`cl_errot_t` for clamav status codes, as well for boolean variables.
This hides warnings that would indicate bugs, and makes it harder to
read the code.

I haven't gone as in depth as with some other code cleanups. This
largely just replaces function interfactes and ret variables that use
`int` with `cl_error_t`. I also swapped a couple of `int`s to `bool`s.

While doing so I found that the `cli_bytecode_context_setpdf()` function
was incorrectly placed in the `bytecode_api.c` file instead of the next
to similar functions (`cli_bytecode_context_setpe`, etc.) in bytecode.c.
It's not an API function, so I moved it to the correct location.

I also eliminated a couple of compiler warnings:

- LLVM's CFG.h header emits a warning about a multi-line comment, so
  that crops up with using LLVM for the bytecode runtime.
  I disabled the warning through CMake.

- C doesn't like using the `inline` keyword on cli_dbgmsg in the
  declaration in `bytecode2llvm.c` because we're compiling the bytecode
  runtimes as a separate object file from the rest of libclamav.
  It doesn't appear to be a functional issue, but I swapped that file
  over to use `cli_dbgmsg_no_inline()` instead, just in case.
  I would hope link-time-optimization will inline it anyways.
2022-10-19 13:13:57 -07:00
Micah Snyder
2551fcf0f7 Support uppercase TARGET_ARCH_TYPE
The TARGET_ARCH_TYPE variable comes from $env:PROCESSOR_ARCHITECTURE,
which at least on my machine is AMD64, not amd64.
2022-03-09 20:35:42 -08:00
Micah Snyder
b07b1a65cb Fix linker issues with global variable used in tests
The `have_clamjit` global is used in the unit tests but doesn't appear
to be exported when I was testing the external LLVM runtime support PR,
resulting in an undefined symbol issue. Converting this to a function
that returns 0 or 1 instead of a global variable resolved the issue.
2022-03-09 20:35:42 -08:00
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
b3e82e5e61 Replacing libclamav/cltypes.h with clamav-types.h.in, which generates a header clamav-types.h that we install alongside clamav.h. 2019-10-02 16:08:17 -04:00
Micah Snyder
72fd33c8b2 clang-format'd using new .clang-format rules. 2019-10-02 16:08:16 -04:00
Mickey Sola
46a35abe56 mass update of copyright headers 2015-09-17 13:41:26 -04:00
Shawn Webb
60d8d2c352 Move all the crypto API to clamav.h 2014-07-01 19:38:01 -04:00
Shawn Webb
b2e7c931d0 Use OpenSSL for hashing. 2014-02-08 00:31:12 -05:00
David Raynor
bebd86a60b bb#5343 2012-06-22 16:55:29 -04:00
Török Edvin
25c7e61a81 Fix warning on FreeBSD. 2010-08-14 15:18:35 +03:00
Török Edvin
a78f2183ed Prevent fclose(NULL) on SELinux (bb #2200). 2010-08-13 13:59:31 +03:00
Török Edvin
cdb69c09d4 Fix SELinux detection in enforcing mode.
It denies access to /proc/filesystems and /selinux/enforce.
2010-08-10 09:57:25 +03:00
Török Edvin
946a3f0725 Fix SELinux detection. 2010-08-09 23:48:31 +03:00
Török Edvin
e2a499a09b Fix PaX. 2010-08-09 22:38:16 +03:00
aCaB
1bb5a24d3e win32 fixes: bb#2152 and bb#2153 2010-08-05 12:08:13 +02:00
Török Edvin
69650bea38 win32 build fix.
forgot to commit.
2010-07-29 22:17:30 +03:00
Török Edvin
c85060ff79 Move environment detection code to bytecode_detect.c.
This is in preparation for bug #2078, so that the bytecodes can turn themselves off
based on more than just the arch itself.
2010-07-29 13:48:13 +03:00