mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -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;
|
char *ptr = id;
|
||||||
if(ptr) {
|
if(ptr) {
|
||||||
/* lower case the name part */
|
/* lower case the name part */
|
||||||
while(*ptr != ':') {
|
while(*ptr && (*ptr != ':')) {
|
||||||
*ptr = (char)TOLOWER(*ptr);
|
*ptr = (char)TOLOWER(*ptr);
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user