[PATCH GnuPG 1/2] gpg: fix fpr comparison in keyserver screener
Vincent Breitmoser
look at my.amazin.horse
Sun May 12 12:36:55 CEST 2019
* g10/keyserver.c (keyserver_retrieval_screener): Only compare actual
fpr_len
---
g10/keyserver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 04802d1a5..5b5cf1c13 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1055,7 +1055,7 @@ keyserver_retrieval_screener (kbnode_t keyblock, void *opaque)
{
if (desc[n].mode == KEYDB_SEARCH_MODE_FPR)
{
- if (fpr_len == desc[n].fprlen && !memcmp (fpr, desc[n].u.fpr, 32))
+ if (fpr_len == desc[n].fprlen && !memcmp (fpr, desc[n].u.fpr, fpr_len))
return 0;
}
else if (desc[n].mode == KEYDB_SEARCH_MODE_LONG_KID)
--
2.20.1
More information about the Gnupg-devel
mailing list