From 438e9e0969a09a1a4143b7f16a39445902253924 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 27 May 2019 01:56:55 +1000 Subject: [PATCH] [common] option: fixed missing null terminator --- VERSION | 2 +- common/src/option.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 41a73c33..bcbda969 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-rc2-5-g4cf2c7a350+1 \ No newline at end of file +B1-rc2-6-g9554e82c47+1 \ No newline at end of file diff --git a/common/src/option.c b/common/src/option.c index baf5edb3..5a9fc6fb 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -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"); }