From 37447cd955fa42f5fc7a0767ff53c4ebfc82239c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 30 Oct 2020 10:55:27 +0100 Subject: [PATCH] =?UTF-8?q?module/script:=20initialize=20string=20tags=20f?= =?UTF-8?q?rom=20our=20NULL-terminated=20=E2=80=98value=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `_value` is a pointer into the receive buffer, and may not be NULL terminated, and may also contain data belonging to the next tag. --- modules/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/script.c b/modules/script.c index a005283..b3e3fd4 100644 --- a/modules/script.c +++ b/modules/script.c @@ -106,7 +106,7 @@ process_line(struct module *mod, const char *line, size_t len) struct tag *tag = NULL; if (type_len == 6 && memcmp(type, "string", 6) == 0) - tag = tag_new_string(mod, name, _value); + tag = tag_new_string(mod, name, value); else if (type_len == 3 && memcmp(type, "int", 3) == 0) { long value = strtol(_value, NULL, 0);