From a670410588e5815f1cf5c7c78ca0f53f8bbff5b0 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sun, 16 Dec 2007 04:54:33 -0800 Subject: [PATCH] Minor bug discovered at hackathon. --- configure.ac | 1 + include/memcached.h | 3 ++- lib/memcached_hosts.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a1bc2afe..3e3acbc4 100644 --- a/configure.ac +++ b/configure.ac @@ -68,5 +68,6 @@ else fi AC_C_CONST +AC_HEADER_TIME AC_TYPE_SIZE_T AC_OUTPUT(Makefile src/Makefile tests/Makefile docs/Makefile lib/Makefile include/Makefile support/Makefile support/libmemcached.pc support/libmemcached.spec) diff --git a/include/memcached.h b/include/memcached.h index 315c284b..182d6992 100644 --- a/include/memcached.h +++ b/include/memcached.h @@ -11,7 +11,7 @@ #define __MEMCACHED_H__ #include -#include +#include #include #include @@ -181,6 +181,7 @@ struct memcached_result_st { memcached_string_st value; uint32_t flags; uint64_t cas; + /* Add result callback function */ }; struct memcached_st { diff --git a/lib/memcached_hosts.c b/lib/memcached_hosts.c index 402018b4..5661e541 100644 --- a/lib/memcached_hosts.c +++ b/lib/memcached_hosts.c @@ -38,7 +38,7 @@ static void host_reset(memcached_server_st *host, char *hostname, unsigned int p memcached_connection type) { memset(host, 0, sizeof(memcached_server_st)); - memcpy(host->hostname, hostname, strlen(hostname)); + strncpy(host->hostname, hostname, MEMCACHED_MAX_HOST_LENGTH - 1); host->port= port; host->fd= -1; host->type= type; -- 2.30.2