1
0
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:
Patrick Monnerat 2007-08-15 14:49:16 +00:00
parent e5d8693865
commit ca410ec2ca

View File

@ -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;