Files
seader/allocation_policy.c
2026-06-17 16:09:15 -07:00

17 lines
295 B
C

#include "allocation_policy.h"
#include <stdint.h>
bool seader_size_multiply_checked(size_t count, size_t size, size_t* out) {
if(!out) {
return false;
}
if(count != 0U && size > SIZE_MAX / count) {
return false;
}
*out = count * size;
return true;
}