mirror of git://git.gnupg.org/gnupg.git
kbx: Fix an endless loop under Windows due to an incomplete fix.
* kbx/keybox-search.c (keybox_search): We need to seek to the last
position in all cases not just when doing a NEXT.
--
This is because search from the beginning needs a keybox_search_reset.
We can only make an exception for KEYDB_SEARCH_MODE_FIRST..
Fixes-commit: 6f72aa8214
GnuPG-bug-id: 4505
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
6f72aa8214
commit
0fff927889
|
@ -903,9 +903,9 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
/* log_debug ("%s: re-opened file\n", __func__); */
|
/* log_debug ("%s: re-opened file\n", __func__); */
|
||||||
if (ndesc && desc[0].mode == KEYDB_SEARCH_MODE_NEXT && lastfoundoff)
|
if (ndesc && desc[0].mode != KEYDB_SEARCH_MODE_FIRST && lastfoundoff)
|
||||||
{
|
{
|
||||||
/* Search mode is next and the last search operation
|
/* Search mode is not first and the last search operation
|
||||||
* returned a blob which also was not the first one. We now
|
* returned a blob which also was not the first one. We now
|
||||||
* need to skip over that blob and hope that the file has
|
* need to skip over that blob and hope that the file has
|
||||||
* not changed. */
|
* not changed. */
|
||||||
|
|
Loading…
Reference in New Issue