aboutsummaryrefslogtreecommitdiffstats
path: root/src/byte_source.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/byte_source.c')
-rw-r--r--src/byte_source.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/byte_source.c b/src/byte_source.c
index 7c191745..5443f4dd 100644
--- a/src/byte_source.c
+++ b/src/byte_source.c
@@ -7,6 +7,7 @@
#include "serd/serd.h"
+#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
@@ -43,6 +44,10 @@ serd_byte_source_open_source(SerdByteSource* const source,
{
const Cursor cur = {name, 1, 1};
+ assert(read_func);
+ assert(error_func);
+ assert(page_size > 0);
+
memset(source, '\0', sizeof(*source));
source->stream = stream;
source->from_stream = true;