Use CONST_ALIGN_TO to express the compile-time overflow check for
the ALIGN(sizeof(sd_bus_message)) + sizeof(BusMessageHeader)
allocation, since ALIGN() is not constexpr.
CID#
1548031
Follow-up for
de1c301ed165eb4d04a0c9d4babe97912b5233bb
/* Creation of messages with _SD_BUS_MESSAGE_TYPE_INVALID is allowed. */
assert_return(type < _SD_BUS_MESSAGE_TYPE_MAX, -EINVAL);
+ /* Silence static analyzers */
+ assert_cc(sizeof(sd_bus_message) + sizeof(void*) + sizeof(BusMessageHeader) <= SIZE_MAX);
sd_bus_message *t = malloc0(ALIGN(sizeof(sd_bus_message)) + sizeof(BusMessageHeader));
if (!t)
return -ENOMEM;