X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fsocket.cc;h=9e06841ac9abe2de3b64f7ee69c4a699ad863959;hb=59acef2d2b59a3f1a55337a933b97d901d46133a;hp=7f7037f9dda19d154a00bce8105b5f84643dbfca;hpb=9139975f5fe7895259645117b1e0e9a6cb9c27cc;p=awesomized%2Flibmemcached diff --git a/libtest/socket.cc b/libtest/socket.cc index 7f7037f9..9e06841a 100644 --- a/libtest/socket.cc +++ b/libtest/socket.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libtest/yatlcon.h" #include static char global_socket[1024]= { 0 }; @@ -55,7 +55,7 @@ void set_default_socket(const char *socket) { if (socket) { - strncpy(global_socket, socket, strlen(socket)); + strncpy(global_socket, socket, sizeof(global_socket)-1); } }