mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Fix a potential buffer overflow bug in lib/version.c
This commit is contained in:
parent
e5d8693865
commit
ca410ec2ca
@ -57,8 +57,9 @@ char *curl_version(void)
|
|||||||
size_t len;
|
size_t len;
|
||||||
size_t left = sizeof(version);
|
size_t left = sizeof(version);
|
||||||
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
|
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
|
||||||
ptr=strchr(ptr, '\0');
|
len = strlen(ptr);
|
||||||
left -= strlen(ptr);
|
left -= len;
|
||||||
|
ptr += len;
|
||||||
|
|
||||||
len = Curl_ssl_version(ptr, left);
|
len = Curl_ssl_version(ptr, left);
|
||||||
left -= len;
|
left -= len;
|
||||||
|
Loading…
Reference in New Issue
Block a user