1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/lib/audit_logging
Li Yuxuan 78635d55fb audit_logging: Use json_int_t instead of int for json_add_int value type
Functions like `add_lock_to_json` and `add_profile_item_to_json` pass
some values to `json_add_int` with `intmax_t` types. This may cause
arithmetic overflow when the value grows very fast, such as the
read_bytes profiling data.
Use `json_add_int` instead of `int` to avoid the overflow.

RN: Make json output show intmax_t value properly

Signed-off-by: Li Yuxuan <liyuxuan.darfux@bytedance.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar  9 21:33:43 UTC 2023 on atb-devel-224
2023-03-09 21:33:43 +00:00
..
tests audit_logging:tests: Add big_int test for json_add_int 2023-03-09 20:38:31 +00:00
audit_logging.c audit_logging: Use json_int_t instead of int for json_add_int value type 2023-03-09 21:33:43 +00:00
audit_logging.h audit_logging: Use json_int_t instead of int for json_add_int value type 2023-03-09 21:33:43 +00:00
wscript_build build: Do not build selftest binaries for builds without --enable-selftest 2019-11-22 11:48:59 +00:00