projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
| inline |
side by side
Fix for poorly terminated hostname.
[awesomized/libmemcached]
/
lib
/
memcached_hosts.c
diff --git
a/lib/memcached_hosts.c
b/lib/memcached_hosts.c
index d5ec56064534af7b1ff02de9797138eb59b3015a..9e9c667317b6d80c1dfc02ed107dd21ffa96e640 100644
(file)
--- a/
lib/memcached_hosts.c
+++ b/
lib/memcached_hosts.c
@@
-125,6
+125,7
@@
static memcached_return server_add(memcached_st *ptr, char *hostname,
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
memcpy(new_hostname, hostname, strlen(hostname));
+ new_hostname[strlen(hostname)]= 0;
host_reset(&ptr->hosts[ptr->number_of_hosts], new_hostname, port, type);
ptr->number_of_hosts++;