Skip to content

Commit

Permalink
hostip.c: fix potential write past the end of string buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Jan 2, 2012
1 parent 8e25d1b commit cc69e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hostip.c
Expand Up @@ -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++;
}
Expand Down

0 comments on commit cc69e56

Please sign in to comment.