Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2839123iof; Wed, 8 Jun 2022 13:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu+IrGOCkHaSGbPWU/cnfCLGF3DNIJZUvwBw7Be217I3YfzR9/VY7l91C6qkF6/SjAZHyZ X-Received: by 2002:a17:906:58c5:b0:6fe:fa12:1da9 with SMTP id e5-20020a17090658c500b006fefa121da9mr32988843ejs.148.1654719063278; Wed, 08 Jun 2022 13:11:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654719063; cv=pass; d=google.com; s=arc-20160816; b=IRtACfgcp1neN29YD982Xx0Rrr85lGo8c0W4bWbLIXNfJWzEuLBCfj0GAWR/yqkO2g sm9l1DvkfgQfgRd/Y1mr3+mViZdOYkWhZB6nLN7wBnsOtuABSVaHgQYa+NeBQ/JqJjJN /FjAv7wmLeXYIC1POOSjzEL/1ZQLoecHt2lMW9I+2XcyZEQKXPWUPfdxGmGauiNWbcbJ UOD5wrAMon0TgC6imz7ipJQLVPpaliXCIPma70LXmuoWGFAY+K7LIYKubFypsAIlIizu bjYHNleFKnWX7aqHbBHdxqnvcYdfYMus5xGVA37TkDIMzuuocaztW6ilRCk+LYUQnbE1 ee5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=N7JAE+B++g2m1t/hEsrU0PKrjxQTP1bkBrPtc/imOfA=; b=Bs/rTlup//9qQNUzhw9BC1WOxejJZXnX9S38MJ1n9pVOBE4nLfFV0/pMZKZmCui6FS vccQIBLRw5vCBxNkFtTuM9eNWcvWyPB4zLmdhROSjeJzCKOG7FCMNAFwYjgnNzbCfq/X /MpEmffnF0hBibRGRoGJ5AZ/CJKrSsc/vYg0maspq1+hmO+958OQ2VHBXR0/B151jcxw 4W+mghWFng/8tWpp/aCKB6y3jxntFGj30laXK38lad1JM5USsWjqYgJXurledwafLzCB RQG0YOZc/z67gh4FlVCghnYGW8OtpmYygnzEpBJxvriwd+Fxsk4GExdcqsTgOx2Fe6T1 4ZLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=DGO7goa8; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q25-20020a50c359000000b0042dd1a265easi1994300edb.362.2022.06.08.13.10.37; Wed, 08 Jun 2022 13:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=DGO7goa8; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232501AbiFHSnx (ORCPT + 99 others); Wed, 8 Jun 2022 14:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231774AbiFHSnt (ORCPT ); Wed, 8 Jun 2022 14:43:49 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075058.outbound.protection.outlook.com [40.92.75.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 150D9E0E6; Wed, 8 Jun 2022 11:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hIgeot4+P7v2mT4tlmIQ2gIbGiPm6o0dV83aG62R3Li9kJCovLE/yAjTwpQtL6EEHTkcJRx76lt14qsQsnbJYXYZDKy3wiEvc0dqEGYuH9B3gAc6zgDMepQOPGq/5anP+8E2sKHY4dZocwvtaUHI+NOuCoYaV9MpSpordXT40Pq7mNRStAYugup5DNSlUaIY+M2c+vpRkTKhtZwGXa63GK2kzseojbM7adFHrtGw5dBzX7id9Bcz4O5dqmBxwcI9rYdFCwbugaIpr72geJwJ/nfaQj0/cUWLwgZZ5L7tbj/YfJA5lFJNLg30s/j+TMFuN6fO0WmAQAzGPVKxJ0CTGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=N7JAE+B++g2m1t/hEsrU0PKrjxQTP1bkBrPtc/imOfA=; b=njh9UDlxo7EXiAXrVkHXSC4Vm1DxrgRl1+JV/Fmyjb9vvv5ZAi4eKuJy/XCahScE0+jC8OFIS8psqPBE96Gk6UBgKkSNSNKCxFgIfaxL+llXjEq8vsLnvvyetP9YlIxl8a53Nqv078PzViBCpA6Kj8/WzXhfWjs86b7fVwfEeYRGO6BngLRtcpnG0va69u4MQjJWPJ7a6ZCh/Fauw3MKKMFa+RBuoT5NJpcaPLgoKYI6OUxFhSS53Xw3TbMwcd7aElvIkJ2QM9MTJb8QLDH6KxOF35av8wTU3rsS8NjxRSX/xwQLtGNTQAyhhjeBnGvKc6QFHv0LU9aCg4JwB5lMGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N7JAE+B++g2m1t/hEsrU0PKrjxQTP1bkBrPtc/imOfA=; b=DGO7goa84vnhZL4dNLr1X3JI3wIAvRhpFra9V7+cc8+IoaTVegMbnwV/1hVZX/qtAD0d9prjjO4sB9lZh9P62+2Di/CX01S/GxG+4Re/DHqzPGTj8k13y+FtSmDCMATjsrLE6kZ8+Jx7fyYu+zd6P+Dtfo3EVv/yvt+kX7ArkCBvHbDszf04lxNY1z1q94zJxfD3SGHozj3nNkwIqpO8xWL5oTrsopybBaX/EoNKaqK9ASh3xPR7GOAyuzZJgj6KhDjTj3mt6o3FmVxAlmvgZgBU7b3xNnhSgT2DucXDmOK293doslPNRxt+j6yQTz6P9t6XjRKn5/gn6vS/XlgeIQ== Received: from PA4P189MB1421.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:c2::10) by DB6P18901MB0070.EURP189.PROD.OUTLOOK.COM (2603:10a6:4:24::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.17; Wed, 8 Jun 2022 18:43:45 +0000 Received: from PA4P189MB1421.EURP189.PROD.OUTLOOK.COM ([fe80::5ae:1a99:f05c:b75d]) by PA4P189MB1421.EURP189.PROD.OUTLOOK.COM ([fe80::5ae:1a99:f05c:b75d%5]) with mapi id 15.20.5332.012; Wed, 8 Jun 2022 18:43:45 +0000 From: Saud Farooqui To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saud Farooqui Subject: [PATCH] rpmsg: strcpy is not safe, use strncpy Date: Wed, 8 Jun 2022 23:43:30 +0500 Message-ID: X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [3NLd1mCZwQ5M7HsdUBgK4az245lqAQgF] X-ClientProxiedBy: DX2P273CA0023.AREP273.PROD.OUTLOOK.COM (2603:1086:300:8::35) To PA4P189MB1421.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:c2::10) X-Microsoft-Original-Message-ID: <20220608184330.1142959-1-farooqui_saud@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32ca8aad-0e8d-4800-eec5-08da497ed165 X-MS-Exchange-SLBlob-MailProps: 6H6McBavlAiqBMfLsegtj+nEWaF0sBfds/w2qooSRAKNBmwYprkBEuf55DEbFcvyPnD3QznlVVu8BNTT2ejjQaPu/aEdf8NgGUnNzT+PNkHRZi/O23vqTHZvW1VOLMqMegxeDbMtEtO9IlYCc5txBv5uhlwFlllmmioElpY93g1YOEZcBlYlS/pIo9ZYj5HirOnOsmeMVd0EeF5/DGlUOKAnGzFvO2iM2YonEHyDRBO0h8RJj+cgL5FsrrUFjv3D7fVsdiIiG96Fm+5w4QSLw1JaiAFRO3BdMOBgwL61czictZzwgze7R/MNC0DPBJVGasjxgmi8ZIDGseGVqD0LEJC5q8lDSzSKJQQhbGbrCGWbkuuUYYYEDQ0PBS3JCT+wP2/Bq7Ez+qq6tkxqDVpurmPZOGopDSfTK4XkX8xXhPo0ra227+Oe/cBSv1bN1Ndi+1Pkf3fBIcBhw5ry6xvP7poWeijN5x76ZU9uJ6JRiJQqtfZknG+eMX1Yb9gk5gZ5+4VtKRSaAojzAu1rXblnnyhI6ACvu4sduASAUmQKLsGDzQOmq/XR291WP0pjV7VT43/UJyrPg7fWzXRq+Ven2M7chqxRYPlh65JO1B6toZjpFX5H4UMkOnVPo0I5C+RJR5BkYZtAfrB+K5ytup812rrcgG8135Zk2wdqzxsK3T94o3T9qFqfWNnl+BrKVnRomLPOwhILc5yfv1iNhKf1zPhYDHmJfPe5Whi8H58EuO2XSKW7OW/Xk2eqb7ziARfjxqcFvy8CT4w= X-MS-TrafficTypeDiagnostic: DB6P18901MB0070:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SrTyNKQPIkHE4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B14IQ8z3TFmZ4Kx+uDxsYtrRlksKt2w9DjV1JJgIO5TNuR?= =?us-ascii?Q?wlHEZK0dkPQeBEOO8kMFQhB/eZ1h4sWEUSI1wZEZqdVr3S76+wOquS2zNtq+?= =?us-ascii?Q?dwPhZkRmPPo9RVJuhzKqeO2gnQaJqMo9Xumx8hkKl6sIfWd4UxfXfZk3683v?= =?us-ascii?Q?mrrc63vEpqxzCufUhrFOf2O6eFyX4f6lGStI3sTqKelp3lmaS9ukbeond/mF?= =?us-ascii?Q?eQl/lYzpP/4=3D?= X-OriginatorOrg: sct-15-20-4734-24-msonline-outlook-c54b5.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 32ca8aad-0e8d-4800-eec5-08da497ed165 X-MS-Exchange-CrossTenant-AuthSource: PA4P189MB1421.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2022 18:43:45.7921 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P18901MB0070 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace strcpy with strncpy for copying the rpmsg device name in rpmsg_register_device_override Signed-off-by: Saud Farooqui --- drivers/rpmsg/rpmsg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 290c1f02da10..d3b29c19715d 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -604,7 +604,7 @@ int rpmsg_register_device_override(struct rpmsg_device *rpdev, int ret; if (driver_override) - strcpy(rpdev->id.name, driver_override); + strncpy(rpdev->id.name, driver_override, sizeof(rpdev->id.name)); dev_set_name(dev, "%s.%s.%d.%d", dev_name(dev->parent), rpdev->id.name, rpdev->src, rpdev->dst); -- 2.25.1