Projects
Mega:23.03
libssh2
_service:tar_scm:backport-Skip-leading-r-and-n-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-Skip-leading-r-and-n-characters-in-banner_receive-76.patch of Package libssh2
From 821d50dad313b53fb2782f26aec1f52f1be34fc0 Mon Sep 17 00:00:00 2001 From: Michael Buckley <michael@buckleyisms.com> Date: Wed, 9 Nov 2022 15:56:22 -0800 Subject: [PATCH] Skip leading \r and \n characters in banner_receive() (#769) Fixes #768 Credit: Michael Buckley Conflict:NA Reference:https://github.com/libssh2/commit/821d50dad313b53fb2782f26aec1f52f1be34fc0 --- src/session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/session.c b/src/session.c index 3549152..235ab95 100644 --- a/src/session.c +++ b/src/session.c @@ -147,6 +147,10 @@ banner_receive(LIBSSH2_SESSION * session) return LIBSSH2_ERROR_SOCKET_DISCONNECT; } + if((c == '\r' || c == '\n') && banner_len == 0) { + continue; + } + if(c == '\0') { /* NULLs are not allowed in SSH banners */ session->banner_TxRx_state = libssh2_NB_state_idle; -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2