OSDN Git Service

Revert "mmc: sdio: Update the argument for data copy"
authorNick Desaulniers <ndesaulniers@google.com>
Tue, 24 Oct 2017 22:46:52 +0000 (15:46 -0700)
committerNathan Chancellor <natechancellor@gmail.com>
Fri, 27 Sep 2019 07:42:07 +0000 (00:42 -0700)
This reverts commit 6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8.

The commits
6ecb02a4e10f09c2b484b1f05c676f8e0ae5f150
6a20c55090dbfc3fa3d5a6c93a71c9f727c0bad8
1149dc7d996c67b8b730c0348bb704a6e8e2b5ca

turn

strcpy(string, buf);

into

strlcpy(string, buf, strlen(buf));

which is equivalent. So let's drop these out of tree patches.

Bug: 67861121
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I86e576465367e92e8ca2ce1337edbdc76621a2b1
Link: https://android.googlesource.com/kernel/msm/+/965f632cb0e7c375840a5877e5d40418e0f1210c
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
drivers/mmc/core/sdio_cis.c

index 4a8508e..76a4508 100644 (file)
@@ -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));
+               strlcpy(string, buf, sizeof(string));
                string += strlen(string) + 1;
                buf += strlen(buf) + 1;
        }