mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +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;
|
backends_len = p - backends;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(size && (size < backends_len))
|
if(size) {
|
||||||
|
if(backends_len < size)
|
||||||
strcpy(buffer, backends);
|
strcpy(buffer, backends);
|
||||||
else
|
else
|
||||||
*buffer = 0; /* did not fit */
|
*buffer = 0; /* did not fit */
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user