Commit 9841778f authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

Don't use strlcpy in libcriu (v2)

../../lib/libcriu.so: undefined reference to `strlcpy'

v2: don't include string.h

Reported-by: Mr Jenkins
Cc: Kir Kolyshkin <kir@openvz.org>
Fixes: e5654e58 ("Use strlcpy")
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 15f914f2
......@@ -13,7 +13,6 @@
#include <alloca.h>
#include "criu.h"
#include "string.h"
#include "rpc.pb-c.h"
#include "cr-service-const.h"
......@@ -882,9 +881,9 @@ static int criu_connect(criu_opts *opts)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_LOCAL;
strlcpy(addr.sun_path, opts->service_address, sizeof(addr.sun_path));
strncpy(addr.sun_path, opts->service_address, sizeof(addr.sun_path));
addr_len = strlen(addr.sun_path) + sizeof(addr.sun_family);
addr_len = strlen(opts->service_address) + sizeof(addr.sun_family);
ret = connect(fd, (struct sockaddr *) &addr, addr_len);
if (ret < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment