From 319c08fc2d09d48f71efbe435a878ff9160bdbb2 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Mon, 31 May 2004 23:47:15 +0000 Subject: [PATCH] cscvs to tla changeset 40 Author: noodles Date: 2002/11/16 14:01:59 Added checking to ensure we return no more than maxkey keys from fetch_key_text. --- keydb_db3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keydb_db3.c b/keydb_db3.c index 6d98d38..a6946b3 100644 --- a/keydb_db3.c +++ b/keydb_db3.c @@ -309,7 +309,8 @@ int fetch_key_text(const char *search, struct openpgp_publickey **publickey) llfree(wordlist, NULL); wordlist = NULL; - for (newkeylist = keylist; newkeylist != NULL; + for (newkeylist = keylist; + newkeylist != NULL && numkeys < config.maxkeys; newkeylist = newkeylist->next) { keyid = 0; -- 2.39.5