Coverity flags the multi-term output.iov_len accumulation as a
potential overflow. Add an assert after the calculation to verify
the result is at least as large as the input, catching wraparound.
CID#
1548068
Follow-up for
21bc0b6fa1de44b520353b935bf14160f9f70591
ALIGN8(offsetof(struct metadata_credential_header, name) + strlen_ptr(name)) +
input->iov_len + 2U * (size_t) bsz +
tsz;
+ /* Silence static analyzers */
+ assert(output.iov_len >= input->iov_len);
output.iov_base = malloc0(output.iov_len);
if (!output.iov_base)