Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2359359rdh; Sun, 29 Oct 2023 12:17:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfAz5aWPuxtmiNSMWlELo+jpOyVs0QklCAJCelbzbe6zsigh6GIXt+dLt3a36tZHL62fuL X-Received: by 2002:a05:6a20:2590:b0:16b:977d:f7cf with SMTP id k16-20020a056a20259000b0016b977df7cfmr10897629pzd.36.1698607051772; Sun, 29 Oct 2023 12:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698607051; cv=none; d=google.com; s=arc-20160816; b=gE/SbJoiZjo6IPmB7yro6fUO4smC3CNc6wT9+TqoVxP9WDi8Tfv0VVu+8kHJg1J/6a 3ql7xjJTCeJBz2O+QbWMKFR4/ZtWNx05RMxumbgLqnR2hvOoSjk8QpZcLazjSzHDvTzX Y1BsKbwXtHPMau3VV/yJO7DhXBslUgVHVCxLF3Vaiza5+Yj7nIkbjlIBLvZlPHA87K7M qSFWjZMihhFze30OTHWBRT1t32u07plthDV2OKvyP0TxaHu29EIR9wK4XuIb7pbqDaSt LJ6VpRlXF+4K3EeC78XZ1hwfmWybW+K7yb214m6f6hmfFRbcf/I1Lf7xv3umkEYzGlcA yUPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=ITSqca1evCzkzhn7N4VS98YhVKLbCaQ6LkheIXfd40c=; fh=rrYOFdrHxYibtw7slglIF8KDFxb/cZUdBVRmDy87uD4=; b=Zcwua6NZjcv7VlNKgbDpyH6gksrJLT6oi7zSEuVvcYeM3l7iUTdXye3Tm0gstZO5aH weBIARllV0TGxU3wZiSEmHWRpUuxTOaX2I8IzqjJE6UDemCUj2BOEYpvbA70Fpl4LY57 uLHvVZmK7pgGB0hw7P8UcqccOvtPVx2gDMj7PUZvL4o37EBh5rqum3ooQ7IgDq4IIdjl 6+cgPhmAw67pOkbW6xOM9FweyE7JjsNZc0KbL0zP5YvgQnBByrhZlq7K4NdFwOjWUezC F90ETMAhSGmxWFCiTIZi81mUJuAtI0/cUYSsBJO2ar0WmfhGjCDLAO3RAOBOK8m7cmwN 1nfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=Wmbue4+q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s132-20020a63778a000000b005b90b2d917asi3949134pgc.278.2023.10.29.12.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 12:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=Wmbue4+q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5CE8980622AA; Sun, 29 Oct 2023 12:17:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbjJ2TRO (ORCPT + 99 others); Sun, 29 Oct 2023 15:17:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjJ2TRN (ORCPT ); Sun, 29 Oct 2023 15:17:13 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C7FEB6 for ; Sun, 29 Oct 2023 12:17:10 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32db188e254so2594060f8f.0 for ; Sun, 29 Oct 2023 12:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698607029; x=1699211829; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ITSqca1evCzkzhn7N4VS98YhVKLbCaQ6LkheIXfd40c=; b=Wmbue4+qto/Mi+l2NczYEkPW2S0v48+Bc7RfKYfp+OaLJS3EFHETc6icE4tj83WoYA RAPho8/yVSSj+3yBZOPCiroo4dsvElbmxz88Ss5UL9CpTmhRo2HOjQCqmCAwIPxR0pHO 0VD6+5PkqJRHlp4KqldJ2OV81x6aV3VD022ss7YM6ycPy5NylEcCwvaCoaPz8T5BdiR1 2Gvn1z5g7I3uc5yhaMOCwCjCJURiUZVNpfSdoLkDNCjMwW7CxaJBpYOgn8dD0p8+RTHW gbx7cLCSvioly8/bxf+kZjpv10xOvchMYrJMh3ofX6RL2qZCWs2kuitLTlt9Xn+w49KO m8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698607029; x=1699211829; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ITSqca1evCzkzhn7N4VS98YhVKLbCaQ6LkheIXfd40c=; b=ncuflcvoqeqRNpmWKRrJUeoUbeMWc69ztGH8jfxVqmAoivsHB7XDe8nqS6dIEi4AKx 5z6hRvsibNwzAUzIEeKY27L/Epw7u2nNTwA1VzRyvoGs/H1y+qNLDiPqirV9sBa0myHH VaM5FGbV0iGHRD8ZBu+GACgA2bzhuk5jQ8DWlSH1n3AyBGGXHwouG03j/jA1EnPq9wqB 5M7FKr1XVfYPkL52rBloduCz7HFjR2MeECMe/nPvN5VHNNCTWYq9oP74qZIDEbnA9jAk Vdm9UDY3/6W+kcAbq5f1A6w2yWD88LAfgWh8rKLmeD5F4VX5YYzWbvVid6LR8piokFwW JrLQ== X-Gm-Message-State: AOJu0YzDM4K/RwwWmHt+UtPA4oLJmPyf38j2mhb4zFO2yr9i2RHg7oWx OQAJgwt+Xc8g+kOchKVE6CWh5sU7LEEGXeBi X-Received: by 2002:a05:6000:1865:b0:32f:74ee:fcd4 with SMTP id d5-20020a056000186500b0032f74eefcd4mr7064455wri.2.1698607028509; Sun, 29 Oct 2023 12:17:08 -0700 (PDT) Received: from nancy-1-2.. ([105.163.156.232]) by smtp.googlemail.com with ESMTPSA id p1-20020a5d68c1000000b0032db8f7f378sm6483343wrw.71.2023.10.29.12.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 12:17:08 -0700 (PDT) From: Nancy Nyambura Cc: nicydaniels@gmail.com, outreachy@lists.linux.dev, Nancy Nyambura , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rts5208: Replace strncpy() with strscpy() for appropriate string copying in rtsx_scsi line 524 warning: found by checkpatch.pl script Date: Sun, 29 Oct 2023 22:16:42 +0300 Message-Id: <20231029191647.44127-1-nicymimz@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 29 Oct 2023 12:17:29 -0700 (PDT) Signed-off-by: Nancy Nyambura --- drivers/staging/rts5208/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c index 08bd768ad34d..52324b8ebbc7 100644 --- a/drivers/staging/rts5208/rtsx_scsi.c +++ b/drivers/staging/rts5208/rtsx_scsi.c @@ -523,7 +523,7 @@ static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) if (sendbytes > 8) { memcpy(buf, inquiry_buf, 8); - strncpy(buf + 8, inquiry_string, sendbytes - 8); + strscpy(buf + 8, inquiry_string, sendbytes - 8); if (pro_formatter_flag) { /* Additional Length */ buf[4] = 0x33; -- 2.40.1