Coverity flags a->after->offset + a->after->current_size as a
potential overflow. Both values are validated as not UINT64_MAX
by existing asserts, add an explicit overflow check to document
the invariant for static analyzers.
CID#
1548063
Follow-up for
e594a3b154bd06c535a934a1cc7231b1ef76df73
assert(a->after->offset != UINT64_MAX);
assert(a->after->current_size != UINT64_MAX);
+ /* Silence static analyzers */
+ assert(a->after->current_size <= UINT64_MAX - a->after->offset);
/* Calculate where the free area ends, based on the offset of the partition preceding it. */
return round_up_size(a->after->offset + a->after->current_size, context->grain_size) + free_area_available(a);