about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-05 17:50:52 +0200
committerGitHub <noreply@github.com>2020-06-05 17:50:52 +0200
commitc036108b59ffc98ff8515c94450a036c506b592c (patch)
tree69aae4ff8c37ae8d601cf53159f06ba548ad4d2a
parent2b33be939ad3be07e54f5223cfe0711f29cd35c1 (diff)
parentb5c77cf4f619e8487dc434317a7472152c622a8f (diff)
downloadafl++-c036108b59ffc98ff8515c94450a036c506b592c.tar.gz
Merge pull request #394 from devnexen/libtoken_api_nbsd_upd
libdislocator, adding subset of specific NetBSD api.
-rw-r--r--libdislocator/libdislocator.so.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 1c22897c..a5f03d0c 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -501,3 +501,28 @@ __attribute__((constructor)) void __dislocator_init(void) {
 
 }
 
+/* NetBSD fault handler specific api subset */
+
+void (* esetfunc(void (*fn)(int, const char *, ...)))(int, const char *, ...)
+{
+  /* Might not be meaningful to implement; upper calls already report errors */
+  return NULL;
+}
+
+void *emalloc(size_t len) {
+
+  return malloc(len);
+
+}
+
+void *ecalloc(size_t elem_len, size_t elem_cnt) {
+
+  return calloc(elem_len, elem_cnt);
+
+}
+
+void *erealloc(void *ptr, size_t len) {
+
+  return realloc(ptr, len);
+
+}