Projects
openEuler:Mainline
libssh2
_service:tar_scm:backport-Fix-a-memcmp-errors-i...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-Fix-a-memcmp-errors-in-code-that-was-changed-from-me.patch of Package libssh2
From 13ad7b2f5cd67e0dc843098ce19ce8b208368c29 Mon Sep 17 00:00:00 2001 From: Michael Buckley <michael@buckleyisms.com> Date: Thu, 6 Jan 2022 13:56:22 -0800 Subject: [PATCH] Fix a memcmp errors in code that was changed from memmem to memcmp (#656) Notes: Fixed supported algo prefs list check when upgrading rsa keys Credit: Michael Buckley Conflict:NA Reference:https://github.com/libssh2/commit/13ad7b2f5cd67e0dc843098ce19ce8b208368c29 --- src/userauth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/userauth.c b/src/userauth.c index 988dc17..29f58ba 100644 --- a/src/userauth.c +++ b/src/userauth.c @@ -1147,7 +1147,7 @@ _libssh2_key_sign_algorithm(LIBSSH2_SESSION *session, f = strchr(a, ','); f_len = f ? (f - a) : (int) strlen(a); - if(f_len == p_len && memcmp(a, s, p_len)) { + if(f_len == p_len && memcmp(a, s, p_len) == 0) { if(i != filtered_algs) { memcpy(i, ",", 1); @@ -1185,7 +1185,7 @@ _libssh2_key_sign_algorithm(LIBSSH2_SESSION *session, f = strchr(a, ','); f_len = f ? (f - a) : (int) strlen(a); - if(f_len == p_len && memcmp(a, s, p_len)) { + if(f_len == p_len && memcmp(a, s, p_len) == 0) { /* found a match, upgrade key method */ match = s; match_len = p_len; -- 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