Commit: 8160dd91dfceb18418f86187d248c4da6232223c
Parent: 3c1b9bb4f83e9f8a2ab30fc164422d8addc1e61c
Author: Moritz Luedecke
Date: Sat, 30 Sep 2017 18:20:26 +0200
Use the right buffer size to paste more than twelve characters
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c
@@ -534,7 +534,7 @@ paste(void) {
Atom da;
/* We have been given the current selection, now insert it into input */
- XGetWindowProperty(dpy, win, utf8, 0, (sizeof(pin) / 4) + 1, False,
+ XGetWindowProperty(dpy, win, utf8, 0, pinentry->pin_len / 4, False,
utf8, &da, &di, &dl, &dl, (unsigned char **)&p);
insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t) strlen(p));
XFree(p);