diff options
Diffstat (limited to 'drivers/s390/char/diag_ftp.c')
-rw-r--r-- | drivers/s390/char/diag_ftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/char/diag_ftp.c b/drivers/s390/char/diag_ftp.c index 36bbd6b6e210..65c7f2d565d8 100644 --- a/drivers/s390/char/diag_ftp.c +++ b/drivers/s390/char/diag_ftp.c @@ -159,8 +159,8 @@ ssize_t diag_ftp_cmd(const struct hmcdrv_ftp_cmdspec *ftp, size_t *fsize) goto out; } - len = strlcpy(ldfpl->fident, ftp->fname, sizeof(ldfpl->fident)); - if (len >= HMCDRV_FTP_FIDENT_MAX) { + len = strscpy(ldfpl->fident, ftp->fname, sizeof(ldfpl->fident)); + if (len < 0) { len = -EINVAL; goto out_free; } |