File: upstream-44449b305b.diff

package info (click to toggle)
tmux 2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,032 kB
  • ctags: 5,763
  • sloc: ansic: 36,368; sh: 4,108; awk: 339; makefile: 247
file content (20 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
commit 44449b305bcfa43233c7cc6f67b059414514c649
Author: nicm <nicm>
Date:   Sun Oct 9 07:30:28 2016 +0000

    Use xsnprintf not snprintf for the prompt in window_copy_write_line
    because we don't care if it is truncated to the screen width, we don't
    want it to be fatal.

--- a/window-copy.c
+++ b/window-copy.c
@@ -1288,7 +1288,8 @@
 			xoff = size = xsnprintf(hdr, limit,
 			    "Repeat: %d", data->numprefix);
 		} else {
-			xoff = size = xsnprintf(hdr, limit,
+			/* We don't care about truncation. */
+			xoff = size = snprintf(hdr, limit,
 			    "%s: %s", data->inputprompt, data->inputstr);
 		}
 		screen_write_cursormove(ctx, 0, last);