From 589d4eee3b0a290ffc4625796083c3d8e84f49db Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 9 Jul 2024 19:31:46 +0200 Subject: Check for a printable string --- FICS/variable.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FICS/variable.c b/FICS/variable.c index 532243c..8837c96 100644 --- a/FICS/variable.c +++ b/FICS/variable.c @@ -412,6 +412,10 @@ set_interface(int p, char *var, char *val) if (val == NULL || strcmp(val, "") == 0) return VAR_BADVAL; + else if (!printablestring(val)) { + pprintf(p, "%s: val not printable\n", __func__); + return VAR_BADVAL; + } cp = &(parray[p].interface[0]); size = ARRAY_SIZE(parray[p].interface); -- cgit v1.2.3