]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: assert ALIGN8 result is not SIZE_MAX
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 Apr 2026 23:11:01 +0000 (00:11 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 Apr 2026 23:11:01 +0000 (00:11 +0100)
commite60937b5853de50bbb0941fef49fe6faef213909
tree81544a7ec010b34e1252e1f47daa97f69b1d1275
parent8fa088b8860c9ba6f67d962953cb8f11316f0505
sd-bus: assert ALIGN8 result is not SIZE_MAX

Coverity flags sizeof(BusMessageHeader) + ALIGN8(m->fields_size)
as overflowing because ALIGN_TO can return SIZE_MAX as an overflow
sentinel. Assert that the aligned value is not SIZE_MAX to prove
the addition is safe.

CID#1548023
CID#1548046

Follow-up for 2ac7c17f9d8eeb403b91ee5a389562edaf47fb87
src/libsystemd/sd-bus/bus-message.h