Message ID | 20230110182745.3641128-1-indu.bhagat@oracle.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2903303wrt; Tue, 10 Jan 2023 10:28:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvdMw3sYgY+1ssAmJtOygE+R8v4/bt50w8tPNrMkEtLoM3w9im7iQD8DhsXSA+WnJ/q+yUG X-Received: by 2002:aa7:d30d:0:b0:499:1ed2:645c with SMTP id p13-20020aa7d30d000000b004991ed2645cmr10445778edq.17.1673375289785; Tue, 10 Jan 2023 10:28:09 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c11-20020a05640227cb00b0048ec8fe23dcsi14515926ede.472.2023.01.10.10.28.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 10:28:09 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=sgsGR8sy; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F44F3858407 for <ouuuleilei@gmail.com>; Tue, 10 Jan 2023 18:28:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F44F3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673375287; bh=WHRhuQwhREcM1kcLiVFRVuCE3h3DIIOw81XqdSgL2Dg=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=sgsGR8syJh4YVMkFZNETDhE8gzHTDUVjOzL8Z95v8crR8uJyANl1hkO0XwdfoE/fZ qm3hLq2QCIK3/5DysFkcp02bekVbrbn08O5QKqeT1pG6hpzJwAnSCIcIA7VWJoOi1V mCJtvtzDLN+10Rx5vzN4hnaE2uTc7MzNFM1Die/k= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 431DE385828E for <binutils@sourceware.org>; Tue, 10 Jan 2023 18:27:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 431DE385828E Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30AIL1q2026392 for <binutils@sourceware.org>; Tue, 10 Jan 2023 18:27:57 GMT Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3my0sce2gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 10 Jan 2023 18:27:57 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30AI0Js7030834 for <binutils@sourceware.org>; Tue, 10 Jan 2023 18:27:56 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3n1bnadr7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 10 Jan 2023 18:27:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nxYTreGOI2HQ7vAjjm36CUKtMoSWlkvzofmu84bJeiF/3OiB2O4qHTGMDdQ4ojswaMxSMKaCzCNfSn8dL7ARbRY6zQtFNaJT9OLb8qQ4uZX/8yCiUg8ol2+aKKwDcRgEeuR/hK+peoCESbq7Q1pO6yft7MTjoeAed0ajJR6rBHHiCUwkB9IuncBDYjFVT5XDi0W1cHp0vIq77Li01Uqu0Jr/DDjiFptYHTiAKvctPZSLG/c6h8PJabMTQwboY/V0CSL4oXId98ZMTEgbAY+AXdOsqGjTsoTgLA150NQVtezuuzt55/mA8CyldiHQwO/hH4GXvV7okgVuApTxvLK9CQ== 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=WHRhuQwhREcM1kcLiVFRVuCE3h3DIIOw81XqdSgL2Dg=; b=dV69lPqrii0OJd36yXCjT/L+ZcX1efmZ19FU+lIGU5irBxLIdaVDnHgWqEzVbZrBpTUV6Cu3QPYjoeYdUJrNxehHOlP3WELL4Q0BntaQIisJ2o/7zcEptdZ6oXhFxF1Ic11/5u9bj/tQRRZiRk5VzAYToPY/ZrV0kJpNdGd332tKioGSGKQEsFLnrVXnU7EuGJaTCH8FicTfu+K06wWOSFQxr4O7+iHC6WB0vcvHb0vnWpPNMdQHQM5e202ODegMxJAvM7wxC+OmKFZSu87bhaTsZLOPtQMN3uKJ66dO8jDEG2Srk22L8qlhkOh4dLA9/R7bYRrfqJrdrS0ibuZ/qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by MW4PR10MB6653.namprd10.prod.outlook.com (2603:10b6:303:22e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Tue, 10 Jan 2023 18:27:54 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::14e6:a522:273f:db57]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::14e6:a522:273f:db57%7]) with mapi id 15.20.6002.012; Tue, 10 Jan 2023 18:27:54 +0000 To: binutils@sourceware.org Cc: Indu Bhagat <indu.bhagat@oracle.com> Subject: [PATCH] libsframe: replace an strncat with strcat Date: Tue, 10 Jan 2023 10:27:45 -0800 Message-Id: <20230110182745.3641128-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR04CA0297.namprd04.prod.outlook.com (2603:10b6:303:89::32) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|MW4PR10MB6653:EE_ X-MS-Office365-Filtering-Correlation-Id: e281764a-061e-4522-9c33-08daf33863a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NjQzA1Pj4BnYpaCTTOjdhxUO5kiW9jvhAoR36cS1aIIM3GRjFUUVEXMKHxisbEKbC+qA2ooJ7kEP9Ei/UtTRxaRDIPYXpHKyA9oYg5eeZK8bNl4MwH2RmrqLPKCErsnY5rWU6m+HtIL+CQfPKO0Z4vjZPFR7blmcjx1Xlh4exWFtN2Kue/IPdsXrQ+pX7MBHTlCxYZ4U4unL4qYsYxTRNJbinTE8XfCPZxWiiWzK+CfRoDU6uEgZy/ro9FjjfZeTeMax83ya8QS5nLx2JUtbxjX1JHGxqC6n/quTI8sjflbnTO5mt5l37FLvgXF3WnGt0nTyY0uTyNtxtYjSlxmlyN9y43a9W5rmeOjIDqAbTfwJRtyIg2uu2NVryZIJQ6Q3HnKSTd2jju6MaiAc5F5eXP8PSu7pWy5t4xj+zrkSh0mBSw4pkT0qUJQXmcEDEOzq9qAnaOXFu7/AxneI/2X2ZwOXpTAJs4BQbhaf3dDRX9gZ819Jvo1gXR7dXFKlSsI67fZrw3HxGj27PHOgPVRGeY0CY7wGw3AfKCEoZhO8dL2ZwKca/SAIBd0oOi4khC/NpzKKQERyPVeMEXvxdCxERAO57aqMw9uEbSNZBwhUbX6GPp8AxDDCulhgNitNOk62Y+z6jRnWJJYSaIhd4uAFLg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(136003)(376002)(346002)(366004)(396003)(451199015)(2906002)(5660300002)(44832011)(86362001)(36756003)(8936002)(41300700001)(6916009)(4326008)(8676002)(66946007)(66476007)(66556008)(38100700002)(316002)(6506007)(6486002)(83380400001)(186003)(2616005)(26005)(6512007)(6666004)(478600001)(107886003)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4i80M7MxbEyhwN8xBa7EJoNdUhV+?= =?utf-8?q?Wx5rAlVYPLEyUxTG2CivHO786IBj6z9LTLS5j/Q48QUQvyBHDbjO+ylHCgvpH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OenttJbvUbN9Xzst9vMHuesY1AM87zeCG2ktRW5ms0wrQDa3uUrYlubPS0jl6rcdXykMi6dYfZ+eJTXanoMTS0lm5MfZzcsSYRt7CAWPVXGwlGIKhBL2pCsVh14nQaXaJZ5BOBfeng0LAyreTruFkF9g0QQgmB5Q7Ao+9ZioOhIOfgnC5uQ5XzhznRXsRiIWk0wpxxnPyckdVxccZ0v5Y1AydBkBgJXQq2IcaFtMaCnoGnoMY24ivV78eTOgnq9gnOe2VJbezdx83IeLMpUrRl7DAMOlFdcizI7Fhmenl96jPoo58gUCfK3ZEL/PyjI5PKOzRLYk2sEGByMFZLW5FT7wrDnS/ZQ+6jN24heXIG7wfayD9NXHVxPxlpWEgk4cfN9DLshkeiBDC99u0PAty8eI3+h9MGf0slOuGM9kCxmjkhhCMZCw6nfJDmTi5coaG631a/1ILbZ0NOmUhpSetckVVgNxBAXxfCYNY2 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e281764a-061e-4522-9c33-08daf33863a7 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2023 18:27:54.4024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d6uRMZqGNuc2U72N+oNP+2my0+Li7hQF8ziZzE4HJXmyNXj7kDeznotIPT+ae5htv8/4qSF+rU5OyWKnxSVRyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6653 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_07,2023-01-10_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 spamscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100119 X-Proofpoint-GUID: 4NV3ygDl7empiUHd2SKqkMZpFgABOjji X-Proofpoint-ORIG-GUID: 4NV3ygDl7empiUHd2SKqkMZpFgABOjji X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Indu Bhagat via Binutils <binutils@sourceware.org> Reply-To: Indu Bhagat <indu.bhagat@oracle.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754661167905560543?= X-GMAIL-MSGID: =?utf-8?q?1754661167905560543?= |
Series |
libsframe: replace an strncat with strcat
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Indu Bhagat
Jan. 10, 2023, 6:27 p.m. UTC
Hello, I noticed the following warning on s390x builds, which drew my attention to the code in dump_sframe_func_with_fres: ../../binutils-gdb/libsframe/sframe-dump.c:180:7: warning: ‘strncat’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation] I think using strcat is just as fine here. Thanks, Indu ---------------------------------- Calling strncat with the size of the src string is not so meaningful. The length argument to strncat should specify the remaining bytes bytes in the destination; although in this case, it appears to be unncessary altogether to use strncat in the first place. libsframe/ * sframe-dump.c (dump_sframe_func_with_fres): Use of strcat is just as fine. --- libsframe/sframe-dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c index 320555a0a51..5417a16f48c 100644 --- a/libsframe/sframe-dump.c +++ b/libsframe/sframe-dump.c @@ -176,8 +176,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx, const char *ra_mangled_p_str = ((sframe_fre_get_ra_mangled_p (sfd_ctx, &fre, &err[2])) ? "[s]" : " "); - size_t ra_mangled_p_str_size = strlen (ra_mangled_p_str); - strncat (temp, ra_mangled_p_str, ra_mangled_p_str_size); + strcat (temp, ra_mangled_p_str); printf ("%-13s", temp); } }