[common] option: fixed missing null terminator

This commit is contained in:
Geoffrey McRae 2019-05-27 01:56:55 +10:00
parent 9554e82c47
commit 438e9e0969
2 changed files with 4 additions and 1 deletions

View File

@ -1 +1 @@
B1-rc2-5-g4cf2c7a350+1
B1-rc2-6-g9554e82c47+1

View File

@ -427,6 +427,9 @@ bool option_load(const char * filename)
DEBUG_WARN("Ignored unknown option %s:%s", module, name);
else
{
if (value)
value[valueLen] = '\0';
if (!option_set(o, value))
DEBUG_ERROR("Failed to set the option value");
}