diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-03-13 07:07:40 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-03-12 23:07:40 -0700 |
commit | b9ad0cfad30c6fd1328658d8195f552f24df6ff9 (patch) | |
tree | 396b4817804c008be4056096159627f5c525e489 /src/window.rs | |
parent | 1977215b0be083f26d7670ed9c7c837f156274ea (diff) | |
download | alacritty-b9ad0cfad30c6fd1328658d8195f552f24df6ff9.tar.gz alacritty-b9ad0cfad30c6fd1328658d8195f552f24df6ff9.zip |
Prevent negative cell dimensions (#1181)
Prevent the cell dimensions from going below 1, this bug resulted in
allocation of large amounts of memory in the scrollback PR but is also
present on master.
Currently the approach is to just `panic!`, however an `eprintln!` and
`exit` could be an alternative too. I don't think it's realistic to
check this at startup and it should have no performance impact since the
failing method is only called once at startup.
To make it a bit more clear what kind of values are accepted, the
datatypes of offsets and paddings have also been changed so that these
don't accept floats anymore and padding can never be negative.
This should allow us to be a bit more strict with the config to make
sure that errors are printed when invalid values are specified (like
negative padding).
This fixes #1167.
Diffstat (limited to 'src/window.rs')
0 files changed, 0 insertions, 0 deletions