diff options
Diffstat (limited to 'usr.bin/tmux/screen-write.c')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 37373f03ccc..028ddcf5dac 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.133 2017/11/02 22:00:42 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.134 2017/11/03 17:02:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -403,6 +403,8 @@ screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src, cy = s->cy; for (yy = py; yy < py + ny; yy++) { + if (yy >= gd->hsize + gd->sy) + break; cx = s->cx; for (xx = px; xx < px + nx; xx++) { if (xx >= gd->linedata[yy].cellsize) |