X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Flibssh.c;h=9e3d4da45eff0e471ea1661aa03bee63d232bad5;hb=e00e8639b22a06b77ada2b906a4b1ccdb373adc1;hp=49e92e7516fc6a896c09e35700ead93d6d62033a;hpb=373bfe4fcaff48e0546662e818bfce7812bf75e7;p=ffmpeg diff --git a/libavformat/libssh.c b/libavformat/libssh.c index 49e92e7516f..9e3d4da45ef 100644 --- a/libavformat/libssh.c +++ b/libavformat/libssh.c @@ -103,7 +103,7 @@ static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user } } - if (!authorized && (auth_methods & SSH_AUTH_METHOD_PASSWORD)) { + if (!authorized && password && (auth_methods & SSH_AUTH_METHOD_PASSWORD)) { if (ssh_userauth_password(libssh->session, NULL, password) == SSH_AUTH_SUCCESS) { av_log(libssh, AV_LOG_DEBUG, "Authentication successful with password.\n"); authorized = 1;