1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00
aslepykh 074e3784b8 test: avoid NO_CAST.INTEGER_OVERFLOW in test-oomd-util (#30365)
The  `.mem_total` variable has `uint64_t` type, therefore, when multiplying the number
`20971512` by the number `1024` with the suffix `U`, we will not get the expected result of
`21,474,828,288`, since the number `20971512` without an explicit type indication has
`uint32_t` type.

First, multiplication will occur in accordance with the `uint32_t` type; this operation will
cause a **type overflow**, and only then will this result be assigned to a `uint64_t` type
variable.

It's worth adding the `UL` suffix to the number `20971512` to avoid **overflow**.

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Slepykh.

(cherry picked from commit a6f1551fe785e241e7c5534aa0c580b31a83a28b)
(cherry picked from commit 9ee5ab00e04078cf48d827ff13ca4d104b63b56f)
(cherry picked from commit 9a70c36a8655f3a95fb4a1665672a34776ecc4e7)
2023-12-23 20:42:40 +01:00
2022-04-26 09:13:57 +00:00
2023-01-27 17:47:09 +01:00
2023-12-06 11:15:01 +01:00
2023-12-06 11:15:01 +01:00
2023-11-09 21:05:51 +00:00
2023-02-15 10:29:10 +09:00
2023-02-01 16:52:28 +01:00
2021-03-30 13:17:58 +02:00
2023-11-09 21:05:51 +00:00
2019-04-12 08:30:31 +02:00
2023-08-09 23:04:43 +01:00
2022-12-13 21:27:15 +01:00
2022-10-19 11:17:33 +02:00
2023-03-28 18:57:25 +02:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
CentOS CI - Rawhide (SELinux)
Fossies codespell report
Coverage Status
Packaging status
OpenSSF Scorecard

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.

Description
Backports of patch from systemd git to stable distributions
Readme 226 MiB
Languages
C 89.4%
Python 5.8%
Shell 2.1%
Meson 1.3%
HTML 0.9%
Other 0.4%