On Sun, Jan 24, 2021 at 10:23:37AM +0800, Stephen Zhang wrote: > - strcpy(name, MFD_NAME_PREFIX); > + strscpy(name, MFD_NAME_PREFIX, len + MFD_NAME_PREFIX_LEN); This is silly. Use memcpy() if you must remove strcpy.
On Sun, Jan 24, 2021 at 10:23:37AM +0800, Stephen Zhang wrote: > - strcpy(name, MFD_NAME_PREFIX); > + strscpy(name, MFD_NAME_PREFIX, len + MFD_NAME_PREFIX_LEN); This is silly. Use memcpy() if you must remove strcpy.