mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:31:42 +03:00
tool: add check for curlinfo->age when determining if ssh backend is libssh2
The code failed to check for the version, and could thus read memory past the existing curl_version_info_data structure. This could lead to a crash. Closes #21050
This commit is contained in:
parent
8fce3e17e6
commit
e2186933c1
1 changed files with 2 additions and 1 deletions
|
|
@ -184,7 +184,8 @@ CURLcode get_libcurl_info(void)
|
|||
++feature_count;
|
||||
}
|
||||
|
||||
feature_libssh2 = curlinfo->libssh_version &&
|
||||
feature_libssh2 = curlinfo->age >= CURLVERSION_FOURTH &&
|
||||
curlinfo->libssh_version &&
|
||||
!strncmp("libssh2", curlinfo->libssh_version, 7);
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue