mirror of
https://github.com/curl/curl.git
synced 2026-07-16 00:47:17 +03: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
1 changed files with 6 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue