lib/misc: Use overflow-checked multiply in ALIGN_UP macro
diff --git a/common/lib/misc.h b/common/lib/misc.h
index 1e8286c5..e733105b 100644
--- a/common/lib/misc.h
+++ b/common/lib/misc.h
@@ -100,7 +100,7 @@ uint64_t strtoui(const char *s, const char **end, int base);
#define ALIGN_UP(x, a, onerror) ({ \
__auto_type ALIGN_UP_value = (x); \
__auto_type ALIGN_UP_align = (a); \
- ALIGN_UP_value = DIV_ROUNDUP(ALIGN_UP_value, ALIGN_UP_align, onerror) * ALIGN_UP_align; \
+ ALIGN_UP_value = CHECKED_MUL(DIV_ROUNDUP(ALIGN_UP_value, ALIGN_UP_align, onerror), ALIGN_UP_align, onerror); \
ALIGN_UP_value; \
})
