This is with OpenSSH 3.4p1. In the function wtmpx_get_entry() in the file loginrec.c from lines 1264 through 1292 there is a while-loop with the test condition of "!found". Within the while-loop when the test condition wtmpx_islogin() returns true the action "found = 1;" should be done. Otherwise the while-loop will loop forever on a wtmpx login entry and the entry following it. Found while running the code. When "found = 1;" is added before line 1286 (the "continue;") the code performs as would be expected.
Fixxed in current
Mass change of RESOLVED bugs to CLOSED