]> git.ipfire.org Git - thirdparty/systemd.git/commit
journald: add assert for allocated buffer size 41413/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Sat, 28 Mar 2026 22:46:35 +0000 (22:46 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 30 Mar 2026 12:11:25 +0000 (13:11 +0100)
commitea1e81e1179d0a50ff4348b40d64a15870ccdff8
treee10331e022aca987a0d9b096e85b020519b5c5e9
parent7f133c996c8b1ea9219540ec8f966b64b58d30a6
journald: add assert for allocated buffer size

Coverity flags allocated - 1 as a potential underflow when
allocated is 0. After GREEDY_REALLOC succeeds the buffer is
guaranteed non-empty, but Coverity cannot trace through the
conditional. Add an assert to document this.

CID#1548053

Follow-up for ec20fe5ffb8a00469bab209fff6c069bb93c6db2
src/journal/journald-stream.c