From e89f124afe1798c923423f4b7fa6d67df7950d56 Mon Sep 17 00:00:00 2001 From: Bolke de Bruin Date: Fri, 21 Aug 2020 14:29:01 +0200 Subject: [PATCH] Ensure copying of the whole username/password --- xup/xup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xup/xup.c b/xup/xup.c index e6321651..a235194b 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -1546,11 +1546,11 @@ lib_mod_set_param(struct mod *mod, const char *name, const char *value) { if (g_strcasecmp(name, "username") == 0) { - g_strncpy(mod->username, value, 255); + g_strncpy(mod->username, value, INFO_CLIENT_MAX_CB_LEN-1); } else if (g_strcasecmp(name, "password") == 0) { - g_strncpy(mod->password, value, 255); + g_strncpy(mod->password, value, INFO_CLIENT_MAX_CB_LEN-1); } else if (g_strcasecmp(name, "ip") == 0) {