From 3ad8b54cb023d034806009cc131d06879b749bbd Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 23 Apr 2019 17:54:28 -0700 Subject: [PATCH] mmc: sdio: Fix strlcpy usage Fixes the following clang warning: ../drivers/mmc/core/sdio_cis.c:58:31: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size] Signed-off-by: Nathan Chancellor Signed-off-by: khusika Change-Id: I1b35b56039e03fb3bf6572037fa2421302c6fe32 --- drivers/mmc/core/sdio_cis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index d024c1202de9..f7e9ae0b2a1f 100755 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c @@ -55,7 +55,7 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, for (i = 0; i < nr_strings; i++) { buffer[i] = string; - strlcpy(string, buf, strlen(buf) + 1); + memcpy(string, buf, strlen(buf) + 1); string += strlen(string) + 1; buf += strlen(buf) + 1; }