From 5f74de71c34bdf2c187a1d638611cf4ff3cd54d9 Mon Sep 17 00:00:00 2001 From: hellerve Date: Thu, 19 Mar 2020 10:14:51 +0100 Subject: [PATCH] immune --- cfg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cfg.h b/cfg.h index 85ac215..98c5982 100644 --- a/cfg.h +++ b/cfg.h @@ -59,6 +59,7 @@ char* string_cstr(string* s) { } string string_from_cstr(char* c) { + assert(c != NULL); size_t l = strlen(c); string s = new_string_sized(l); s.len = l; @@ -72,6 +73,7 @@ void string_grow_min(string* s, size_t min_growth) { } void string_cappend(string* s, char* c) { + assert(c != NULL); size_t l = strlen(c); if (s->cap < s->len + l) string_grow_min(s, l); memcpy(s->str+s->len, c, l);