Since those are chunks of code based on our codebase, it's easiest to use the same license.
Let's systematically make use of reallocarray() whereever we invoke realloc() with a product of two values.