Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hostip.c: fix potential write past the end of string buffer

  • Loading branch information...
commit cc69e56ce3bead7d61e30ec5770072e2f499773a 1 parent 8e25d1b
@yangtse yangtse authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/hostip.c
View
2  lib/hostip.c
@@ -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++;
}
Please sign in to comment.
Something went wrong with that request. Please try again.