Add sc_allocarray() util

Add a function to allocate an array, which fails safely in the case
where the multiplication would overflow.
This commit is contained in:
Romain Vimont
2023-02-28 21:48:18 +01:00
parent 2e1cdf204a
commit e9b98ed367
3 changed files with 27 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ src = [
'src/util/intmap.c',
'src/util/intr.c',
'src/util/log.c',
'src/util/memory.c',
'src/util/net.c',
'src/util/net_intr.c',
'src/util/process.c',