rpc: libssh2: Fix regression in ssh host key verification
Commit 792f81a4 caused a regression in the libssh2 host key verification code by changing the variable type of 'i' to unsigned. Since one of the loops used -1 as a special value if the asking callback was found the conversion made a subsequent test always fail. The bug was stealth enough to pass review, compilers and coverity. Refactor the condition to avoid problems. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1047861 (cherry picked from commit 9869f24d)
Showing
想要评论请 注册 或 登录