summaryrefslogtreecommitdiff
path: root/ot_accesslist.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 03:43:34 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 03:43:34 +0200
commitba54aca3a47df0e8c7afde968bd5f7479372a404 (patch)
tree45c9a42cc13efaf3baa5aacb4297f52fd0adf734 /ot_accesslist.h
parent131d8b1a79749ca0977a16532c0738fdfc767001 (diff)
factor out accesslist parser to fix a potential out of bound read and add tests to the accesslist unit
Diffstat (limited to 'ot_accesslist.h')
-rw-r--r--ot_accesslist.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ot_accesslist.h b/ot_accesslist.h
index d05e1f7..b3e979d 100644
--- a/ot_accesslist.h
+++ b/ot_accesslist.h
@@ -19,6 +19,10 @@ void accesslist_deinit(void);
19int accesslist_hashisvalid(ot_hash hash); 19int accesslist_hashisvalid(ot_hash hash);
20void accesslist_cleanup(void); 20void accesslist_cleanup(void);
21 21
22/* Scan buf for up to capacity info_hashes in hexadecimal notation, one per
23 line, and return how many were written to dest */
24size_t accesslist_parse_hashes(ot_hash *dest, size_t capacity, const char *buf, size_t len);
25
22extern char *g_accesslist_filename; 26extern char *g_accesslist_filename;
23#ifdef WANT_DYNAMIC_ACCESSLIST 27#ifdef WANT_DYNAMIC_ACCESSLIST
24extern char *g_accesslist_pipe_add; 28extern char *g_accesslist_pipe_add;