commit 80a4cd16de618adecca6297a7dc03f043273dbd3 parent a63ed7a4d7996b79aa0c810c0c739075a3075c58 Author: Anton Lindqvist <anton.lindqvist@gmail.com> Date: Mon, 8 Jan 2018 20:18:11 +0100 Avoid passing NULL to vsnprintf() Diffstat:
M | xsel.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xsel.c b/xsel.c @@ -2151,7 +2151,8 @@ main(int argc, char *argv[]) display = XOpenDisplay (display_name); if (display==NULL) { - exit_err ("Can't open display: %s\n", display_name); + exit_err ("Can't open display: %s\n", + display_name ? display_name : "(null)"); } root = XDefaultRootWindow (display);