aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/variable.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-07-09 19:31:46 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-07-09 19:31:46 +0200
commit589d4eee3b0a290ffc4625796083c3d8e84f49db (patch)
treec4edc0adc05ae7084e3f7e675d0f22640e17ee4d /FICS/variable.c
parent24e2f5f6da5cb4f5d0b45db138242e0168171708 (diff)
Check for a printable string
Diffstat (limited to 'FICS/variable.c')
-rw-r--r--FICS/variable.c4
1 files changed, 4 insertions, 0 deletions
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);