diff options
author | Dave Davenport <qball@gmpclient.org> | 2023-06-15 19:36:19 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2023-06-15 19:36:19 +0200 |
commit | 635fbd04647354c71e6e0245a4eedcdca0c6fb7b (patch) | |
tree | 937befa972a26ddccbe6ad323a810d401f20d116 | |
parent | e2030846475e204220d762b503afc017e0693591 (diff) |
[ConfigParser] Don't pass commandline options with very long args.
This is a quick 'n dirty fix for this unexpected issue.
fixes: #1855
-rw-r--r-- | source/xrmoptions.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/xrmoptions.c b/source/xrmoptions.c index 833031a3..9c3a72aa 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -547,6 +547,9 @@ static void config_parse_cmd_option(XrmOption *option) { static gboolean config_parser_form_rasi_format(GString *str, char **tokens, int count, char *argv, gboolean string) { + if (strlen(argv) > 4096) { + return FALSE; + } for (int j = 0; j < (count - 1); j++) { g_string_append_printf(str, "%s { ", tokens[j]); } |