mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
vtls: fix missing multissl version info
- Fix erroneous buffer copy logic from ff74cef5
.
Prior to this change the MultiSSL version info returned to the user
was empty.
Closes https://github.com/curl/curl/pull/12599
This commit is contained in:
parent
f111603176
commit
e251e858b9
@ -1413,10 +1413,12 @@ static size_t multissl_version(char *buffer, size_t size)
|
||||
backends_len = p - backends;
|
||||
}
|
||||
|
||||
if(size && (size < backends_len))
|
||||
strcpy(buffer, backends);
|
||||
else
|
||||
*buffer = 0; /* did not fit */
|
||||
if(size) {
|
||||
if(backends_len < size)
|
||||
strcpy(buffer, backends);
|
||||
else
|
||||
*buffer = 0; /* did not fit */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user