diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-12-15 00:30:37 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-12-15 00:30:37 -0500 |
commit | 3c99618132e8f5924f7a865ce595593889000211 (patch) | |
tree | 127fd5a24f94c32b5577780e545b74c9c41f276a /src | |
parent | 31ba6a0a615c9b5d61bb335f756c7c02e701ef5e (diff) |
Fix overflow with unlimited scrollback lines
Diffstat (limited to 'src')
-rw-r--r-- | src/vte.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -13068,7 +13068,7 @@ vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines) _vte_ring_next (screen->row_data)); _vte_ring_resize (screen->row_data, lines); low = _vte_ring_delta (screen->row_data); - high = low + lines - terminal->row_count + 1; + high = lines + MIN (G_MAXLONG - lines, low - terminal->row_count + 1); screen->insert_delta = CLAMP (screen->insert_delta, low, high); scroll_delta = CLAMP (scroll_delta, low, screen->insert_delta); next = MIN (next, screen->insert_delta + terminal->row_count); |