diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-15 14:13:51 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-15 14:13:51 -0400 |
commit | 505780db0021fa6b412e1d2eb021b921bb7f681e (patch) | |
tree | 04ada0c33dc7ae134d7876e13b9921cf47f3e5cd /src | |
parent | cc5fa8b386200cce03ef8a081acccc92dc44ddfb (diff) | |
download | stasis-505780db0021fa6b412e1d2eb021b921bb7f681e.tar.gz |
Die when render variable is NULL
* This was caught when a call to {{ func:xyz() }} lacked opening/closing parenthesis
Diffstat (limited to 'src')
-rw-r--r-- | src/ini.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -451,6 +451,11 @@ int ini_write(struct INIFILE *ini, FILE **stream, unsigned mode) { render = parts[p]; } + if (!render) { + SYSERROR("%s", "rendered string value can never be NULL!\n"); + return -1; + } + if (*hint == INIVAL_TYPE_STR_ARRAY) { int leading_space = isspace(*render); if (leading_space) { |