From 5c842d37aa83cf5ccec21cde2460d95d7fe9cf24 Mon Sep 17 00:00:00 2001 From: "Steffen (Daode) Nurpmeso" Date: Sat, 27 Sep 2014 13:44:07 +0200 Subject: [PATCH] sopen(): replace our last strcpy() with memcpy() --- fio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fio.c b/fio.c index a3cc4864..27943c6c 100644 --- a/fio.c +++ b/fio.c @@ -1293,7 +1293,7 @@ sopen(struct sock *sp, struct url *urlp) if (options & OPT_VERB) { if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof hbuf, NULL, 0, NI_NUMERICHOST)) - strcpy(hbuf, "unknown host"); + memcpy(hbuf, "unknown host", sizeof("unknown host")); fprintf(stderr, _("%sConnecting to %s:%s ..."), (res == res0 ? "" : "\n"), hbuf, serv); } -- 2.11.4.GIT