summaryrefslogtreecommitdiffstats
path: root/g10/keydb.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2015-12-11 14:40:23 +0100
committerNeal H. Walfield <neal@g10code.com>2015-12-11 14:41:34 +0100
commit1605e34fc365edd473aac15c9b4e5aadc1d95cf5 (patch)
treec6ed518105efc5ec281ca3b2578d430600873ee1 /g10/keydb.c
parentagent: Improve error handling. (diff)
downloadgnupg2-1605e34fc365edd473aac15c9b4e5aadc1d95cf5.tar.xz
gnupg2-1605e34fc365edd473aac15c9b4e5aadc1d95cf5.zip
gpg: Fix buffer overflow.
* g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow. -- Signed-off-by: Neal H. Walfield <neal@walfield.org> Regression-due-to: 11ec478 Note: this buffer overflow will only occur if --debug=lookup is passed to gpg and a search by fingerprint is done.
Diffstat (limited to 'g10/keydb.c')
-rw-r--r--g10/keydb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keydb.c b/g10/keydb.c
index 97dfb5fa3..d7c35deac 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -470,7 +470,7 @@ char *
keydb_search_desc_dump (struct keydb_search_desc *desc)
{
char b[MAX_FORMATTED_FINGERPRINT_LEN + 1];
- char fpr[MAX_FINGERPRINT_LEN + 1];
+ char fpr[2 * MAX_FINGERPRINT_LEN + 1];
switch (desc->mode)
{