diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-05-04 20:41:40 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-05-04 20:41:40 -0400 |
commit | 2cad542ca939cd42a30f3d0b75f97a14095e3da5 (patch) | |
tree | 2dea84f07acfca1c014bc3142748016c30f61e67 /src/config.c | |
parent | e9ff48e51a9df78375ce703ff3d4df1a362ac259 (diff) | |
download | runes-2cad542ca939cd42a30f3d0b75f97a14095e3da5.tar.gz runes-2cad542ca939cd42a30f3d0b75f97a14095e3da5.zip |
cap scrollback to avoid unbounded memory usage
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 3a4ae4a..689f042 100644 --- a/src/config.c +++ b/src/config.c @@ -312,6 +312,7 @@ static void runes_config_set_defaults(RunesTerm *t) config->default_cols = 80; config->scroll_lines = 3; + config->scrollback_length = 4096; } static FILE *runes_config_get_config_file() @@ -499,6 +500,9 @@ static void runes_config_set(RunesTerm *t, char *key, char *val) else if (!strcmp(key, "scroll_lines")) { config->scroll_lines = runes_config_parse_uint(val); } + else if (!strcmp(key, "scrollback_length")) { + config->scrollback_length = runes_config_parse_uint(val); + } else if (!strcmp(key, "command")) { config->cmd = runes_config_parse_string(val); } |