From 5fcf57739e68a8b5053e03778aaee0eed445babd Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 11 Mar 2021 22:00:22 -0500 Subject: settings editor, and lots of changes in service of that --- src/user/knob/block.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/user/knob/block.c') diff --git a/src/user/knob/block.c b/src/user/knob/block.c index 5b4590f..9f3f353 100644 --- a/src/user/knob/block.c +++ b/src/user/knob/block.c @@ -1,6 +1,7 @@ +#include +#include #include #include -#include //unsophisticated, should copy by dwords where available void blockcpy(void *to, const void *from, uint32_t size) { @@ -31,6 +32,8 @@ char *strdup(const char *from) { while (*(end++)) ; char *buf = get_block(end - from); + if (!buf) + PANIC("get_block returned 0 in strdup"); blockcpy(buf, from, end - from); return buf; } -- cgit v1.2.3