mirror of
https://github.com/curl/curl.git
synced 2026-04-26 10:12:12 +03:00
Fix a potential buffer overflow bug in lib/version.c
This commit is contained in:
parent
e5d8693865
commit
ca410ec2ca
1 changed files with 3 additions and 2 deletions
|
|
@ -57,8 +57,9 @@ char *curl_version(void)
|
|||
size_t len;
|
||||
size_t left = sizeof(version);
|
||||
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
|
||||
ptr=strchr(ptr, '\0');
|
||||
left -= strlen(ptr);
|
||||
len = strlen(ptr);
|
||||
left -= len;
|
||||
ptr += len;
|
||||
|
||||
len = Curl_ssl_version(ptr, left);
|
||||
left -= len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue