aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 15:32:34 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 15:32:34 +0200
commitc44852846418d687027912d4150404feed0161f9 (patch)
tree8e08a8420179dfe2909c9a77573c5f537a85818c /common.h
parentDon't marshal w (diff)
downloadlibsha2-c44852846418d687027912d4150404feed0161f9.tar.gz
libsha2-c44852846418d687027912d4150404feed0161f9.tar.bz2
libsha2-c44852846418d687027912d4150404feed0161f9.tar.xz
Use malloc by default but allow bounded alloca
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.h b/common.h
index e6e15d5..c053fac 100644
--- a/common.h
+++ b/common.h
@@ -5,10 +5,16 @@
#include <alloca.h>
#include <errno.h>
#include <stddef.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#ifndef ALLOCA_LIMIT
+# define ALLOCA_LIMIT 0
+#endif
+
+
/**
* Process a chunk using SHA-2
*