mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
hostip.c: fix potential write past the end of string buffer
This commit is contained in:
parent
8e25d1b93b
commit
cc69e56ce3
@ -212,7 +212,7 @@ create_hostcache_id(const char *name, int port)
|
||||
char *ptr = id;
|
||||
if(ptr) {
|
||||
/* lower case the name part */
|
||||
while(*ptr != ':') {
|
||||
while(*ptr && (*ptr != ':')) {
|
||||
*ptr = (char)TOLOWER(*ptr);
|
||||
ptr++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user