Skip to content

Commit

Permalink
[ConfigParser] Don't pass commandline options with very long args.
Browse files Browse the repository at this point in the history
This is a quick 'n dirty fix for this unexpected issue.

fixes: #1855
  • Loading branch information
DaveDavenport committed Jun 15, 2023
1 parent e203084 commit 635fbd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/xrmoptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 635fbd0

Please sign in to comment.