summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Luedecke <ritze@skweez.net>2017-09-30 18:20:26 +0200
committerMoritz Luedecke <ritze@skweez.net>2017-09-30 18:20:26 +0200
commit8160dd91dfceb18418f86187d248c4da6232223c (patch)
tree9931a79d09ec36f694236212fbab0e242f3b64ed
parent3c1b9bb4f83e9f8a2ab30fc164422d8addc1e61c (diff)
Use the right buffer size to paste more than twelve characters
-rw-r--r--pinentry-dmenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pinentry-dmenu.c b/pinentry-dmenu.c
index bce1da2..1da85a6 100644
--- 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);