some standard c libraries (e.g. newlib before 4.0.0) don't perform proper overflow check in the multiplication. We just implement calloc here ourselves on top of malloc with proper overflow check in place. This might even safe a handful of ROM bytes.