mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05: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