Vsevolod Stakhov
3d8a5284b3
[Project] Some more adjustments in symbols registration
2 years ago
Vsevolod Stakhov
1c0587856c
[Minor] Add some tests
2 years ago
Vsevolod Stakhov
6b5e725d6b
[Project] Add raii_sink file helper
2 years ago
Vsevolod Stakhov
fd9693073d
[Rework] Rework files structure
2 years ago
Vsevolod Stakhov
4b6706a695
[Minor] Also allow mmaps to be RAII protected
2 years ago
Vsevolod Stakhov
600452bacf
[Minor] Add a simple utility to deal with locked files
2 years ago
Vsevolod Stakhov
a2cefa2b67
[Minor] Add array allocation methods to handle integer overflow
2 years ago
Vsevolod Stakhov
9117058f15
[Minor] Allow to specify mempool when copying an IP address structure
2 years ago
Vsevolod Stakhov
f57cb6099e
[Minor] Use wyrand for fast random as we already use mumhash for fast hashing
2 years ago
Mehmet Suslu
11318c481d
make gcc 8.5 happy
gcc 8.5 doesn't compile this file without template parameters for ptr_and_refcnt constructor.
2 years ago
Vsevolod Stakhov
0b4e9a4f0b
[Minor] Move summation to a separate routine
2 years ago
Josh Soref
2b8e6958f4
Spelling (#4086)
[Rework] Massive spelling fix from @jsoref
2 years ago
Vsevolod Stakhov
192a5fd8bb
[Minor] Improve error reporting
Issue: #4076
2 years ago
Vsevolod Stakhov
d0321f0863
[Minor] Off by one
2 years ago
Vsevolod Stakhov
7bf24f093d
[Minor] Fix a corner case
2 years ago
Vsevolod Stakhov
3ea9cf43a9
[CritFix] Fix upstreams name resolution when there is also a port
This fix is intended to address the case when Rspamd queries for a hostname with
a port part when re-resolving upstreams addresses via the upstreams module.
Found by: @slavkoja
Confirmed by: @moisseev
2 years ago
Vsevolod Stakhov
79b0b67f2d
[Minor] Remove sequential algorithm as it is not actually a rotation alg
Sequential rotation was used just to rotate all upstreams in the loop (e.g.
when you need to do some action for all upstreams). Allowing to specify it as
a user defined algorithm was a mistake as it breaks upstreams API expectations.
See #4043
2 years ago
Vsevolod Stakhov
d3a1896577
[Rework] Timeouts are now global per event and not reseted by IO activity
This actually reproduces old libevent behaviour and it was changed by a big design mistake.
We really want IO timeouts to be fired for the whole set of subsequent events, otherwise it should be
designed in a more configurable way...
2 years ago
Vsevolod Stakhov
fd222e43f3
[Fix] Fix processing captures from pcre2
2 years ago
Vsevolod Stakhov
c1f6f952f4
[Minor] More fixes for headers folding
2 years ago
Vsevolod Stakhov
568773df1d
[Minor] Don't use zero terminated strings
2 years ago
Vsevolod Stakhov
df914aa64f
[Minor] Polish alignment macros
2 years ago
Vsevolod Stakhov
7ad02fc1f7
[Rework] Use xxh3 as a default hash and fix memory/alignment issues
2 years ago
Vsevolod Stakhov
553bd31ac2
[Minor] Fix some alignment issues
2 years ago
Vsevolod Stakhov
f5888ae382
[Minor] Fix arguments order
2 years ago
Vsevolod Stakhov
50528c680d
[Rework] Mempool: Use explicit alignment
2 years ago
Vsevolod Stakhov
d8efaee9fe
[Minor] Fix alignment issue
2 years ago
Vsevolod Stakhov
49768177cf
[Minor] Allow to get a port for a specific upstream
2 years ago
Vsevolod Stakhov
28f764b3b3
[Minor] Add helper to convert a string to a uint64 number
2 years ago
Vsevolod Stakhov
e2e021a182
[Minor] Fix some minor code quality issue
Found by: coverity scan
2 years ago
Vsevolod Stakhov
f16c34d109
[Minor] Try to fix compiler specific issue
2 years ago
Vsevolod Stakhov
ae4b84005c
[Minor] Add utility function for the default size mempool
2 years ago
Vsevolod Stakhov
65803d93db
[Minor] Add missing include
2 years ago
Vsevolod Stakhov
11edb8d089
[Project] Allow mempool allocated mime strings
2 years ago
Vsevolod Stakhov
cf071c74aa
[Minor] Fix some more issues
Found by: coverity scan
2 years ago
Vsevolod Stakhov
7fee396041
[Minor] Fix some more issues
Found by: coverity scan
2 years ago
Anton Yuzhaninov
c961731c94
[Minor] Fix compiler warnings in src/libutil/util.c
src/libutil/util.c:1362:7: warning: unused variable 'len' [-Wunused-variable]
gint len = 0;
^
src/libutil/util.c:1363:8: warning: unused variable 'pass' [-Wunused-variable]
gchar pass[BUFSIZ];
^
2 warnings generated.
2 years ago
Vsevolod Stakhov
1f60a90e18
[Minor] Fix macro name
Reported by: @citrin
2 years ago
Vsevolod Stakhov
90848cca7a
[Fix] Fix rubbish QP sequences decoding
2 years ago
Vsevolod Stakhov
1589bd19ff
[Minor] Use the proper variable in debug
Found by: coverity scan
2 years ago
Vsevolod Stakhov
52041f014b
[Minor] Fix some double frees
Found by: coverity scan
2 years ago
Vsevolod Stakhov
6f5881e0bb
[Minor] Escape \uFFFD in the sources
2 years ago
Vsevolod Stakhov
d53f283c4e
[Minor] Add one more check for use-after-free prevention
2 years ago
Vsevolod Stakhov
e89fc35017
[Minor] Allow to capture upstream object
2 years ago
Vsevolod Stakhov
0632326add
[Minor] Fix match_limit in pcre2 code
2 years ago
Vsevolod Stakhov
f3b23bccaf
[Minor] Save 8 bytes in rspamd_regexp_t
2 years ago
Vsevolod Stakhov
2802836b8a
[Minor] Fix match limit feature in regexps
2 years ago
Vsevolod Stakhov
79339e5d4f
[Minor] Allow to compare utf8 strings of different length
2 years ago
Vsevolod Stakhov
06ba232b45
[Feature] Add rspamd_utf8_strcmp utility
2 years ago
Vsevolod Stakhov
5b17d5900c
[Minor] Add std::hash specialisation + tests
2 years ago