1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

[ConfigParser] Don't pass commandline options with very long args.

This is a quick 'n dirty fix for this unexpected issue.

fixes: #1855
This commit is contained in:
Dave Davenport 2023-06-15 19:36:19 +02:00
parent e203084647
commit 635fbd0464

View file

@ -547,6 +547,9 @@ static void config_parse_cmd_option(XrmOption *option) {
static gboolean config_parser_form_rasi_format(GString *str, char **tokens, static gboolean config_parser_form_rasi_format(GString *str, char **tokens,
int count, char *argv, int count, char *argv,
gboolean string) { gboolean string) {
if (strlen(argv) > 4096) {
return FALSE;
}
for (int j = 0; j < (count - 1); j++) { for (int j = 0; j < (count - 1); j++) {
g_string_append_printf(str, "%s { ", tokens[j]); g_string_append_printf(str, "%s { ", tokens[j]);
} }