mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
Fixed build warnings of the ssh client example.
This commit is contained in:
@ -44,7 +44,9 @@ int authenticate_kbdint(ssh_session session){
|
||||
prompt=ssh_userauth_kbdint_getprompt(session,i,&echo);
|
||||
if(echo){
|
||||
printf("%s",prompt);
|
||||
fgets(buffer,sizeof(buffer),stdin);
|
||||
if (fgets(buffer,sizeof(buffer),stdin) == NULL) {
|
||||
return SSH_AUTH_ERROR;
|
||||
}
|
||||
buffer[sizeof(buffer)-1]=0;
|
||||
if((ptr=strchr(buffer,'\n')))
|
||||
*ptr=0;
|
||||
|
Reference in New Issue
Block a user