From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 498C543337; Wed, 15 Nov 2023 10:41:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC8EA402D8; Wed, 15 Nov 2023 10:40:57 +0100 (CET) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2054.outbound.protection.outlook.com [40.107.247.54]) by mails.dpdk.org (Postfix) with ESMTP id E096440261 for ; Wed, 15 Nov 2023 03:43:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P3i7iC2kFMVKvwpvR2I3b2oGlgECZrfo+4ptZ44kZxajUF29Q0mNFhHyU+nryVjfMaSS7VVXeZrIHnFkSaugjvT6vW9j1vnp/r699U7popho0dEc7ybr2YuoLvLIlaYCh5uVJJRzVMZVTXkiOT8HJ+n49Q0gslUkboahVBnCOW78vvBP+9aekEdRlDR6gu/bVJGUOSPMmfQHR+RKfWYMZXnnPSP6f5QeP5wjJAacu1lbzGYc1aFywZvWL5iQMBNxuqh60mWjsIU75WeXt6Qh+stTeRQ19orKboudUBlLHAHDYaJ9HQR+gAf5u4gN+qX9ef5m6zvZq4YoZGM8TcslSQ== 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=QMU3qLDZ/2KEg7wsrfm8Hp5C9mrODqIpzALFLmEa4Cw=; b=MT+/q5rVv4lnFP+S/mYCuhqEhCpLBNMYkeWJsGLV4wZFr90L+/zT5khxi5Co95NJpPmHjq3SuvlVH+LOriFw7UyEohSUWaaBv9qxM4t752iTYuO1QOCHp46oOv9fWVPWyVPnVfcyjOS39XKouGdnLCe9aJB2+OS1fQtOsNyy9g/iG3UM5YwXIG72jp/bjjROdsmb1vzcCcLcQdhRSq2Ii7iGfRdsS2NgwzY9j/NFSBq72kU9rE41+c2s0hDzmNbvS8D6M3cniMVvBEsBUDsLmDSoRrvkID6tCvckh2F9PpLdy8ueRV8Rgfq5QlKninrVc91xHNCNVpZBmc8goPGZVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QMU3qLDZ/2KEg7wsrfm8Hp5C9mrODqIpzALFLmEa4Cw=; b=EeuiWGYSYjIXHLDR+wlcajTy47BRPrPlCxjaBTH3GMES56s2l2hUMC58KxGVi8YE6Uqm/qxvBI+ywQzCiM8qWWpnPyJre8n4BAsGnBzjDscdG9QCGdzEmeY9RyT4m8ENmCtPdvZE8sOjA+FWMGY6RJXUqSz0M+DdQ5xwllavHW0= Received: from AS8PR04MB8562.eurprd04.prod.outlook.com (2603:10a6:20b:421::9) by DU2PR04MB8645.eurprd04.prod.outlook.com (2603:10a6:10:2dc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.18; Wed, 15 Nov 2023 02:43:30 +0000 Received: from AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1aee:7715:a032:5079]) by AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1aee:7715:a032:5079%4]) with mapi id 15.20.7002.015; Wed, 15 Nov 2023 02:43:30 +0000 From: Sachin Saxena To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@amd.com" , Hemant Agrawal , Shreyansh Jain CC: "dev@dpdk.org" Subject: RE: [PATCH v2 03/16] bus/fslmc: verify strdup return value Thread-Topic: [PATCH v2 03/16] bus/fslmc: verify strdup return value Thread-Index: AQHaE709bFg9mb8iLUGf71MVN2tl8LB6s4Ew Date: Wed, 15 Nov 2023 02:43:30 +0000 Message-ID: References: <20231110100117.8350-1-fengchengwen@huawei.com> <20231110100117.8350-4-fengchengwen@huawei.com> In-Reply-To: <20231110100117.8350-4-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR04MB8562:EE_|DU2PR04MB8645:EE_ x-ms-office365-filtering-correlation-id: 56eaf9f1-bf15-4176-7208-08dbe584a74c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8a+LD1S3oGrG4h1b78Nthu3SJ+Ne+yrwck1EXtYS9NUHEsf0LEZ2odO7VVYsYK62mrWJPR6XEZ/+lkhCkhyptkGSo0SRtdMxAd/h4fe1CZPXmnLQlH++XlGS466x4pNQxkAoJynACNcUdnbGWUdxkpG32/PkZAKArBFGmVUE7B3hg9wZxS5n6ihOj66mzdXj3uLg7dsbiIf5i3PWzOv9ArQ7BHMH3+CvUYhpumuYSm7WgJ/B7+SdwTLxLrXJrvwoYySsZoQf7LT+ziRLqTFkfv7/xB95Xed0M3KAss/xIDlZVJ0dCUNCm35tJjX3sSBj3lFhaek5TAeWBtNm1zCWPXduHyNp4nSHWIumcv1JQwKm9cjPkaRFwwvXRMY22Sfegr9u8YDAel2lq1FjQX02AvbdJQjSfrnxyjxnK2q+L3Lbati0Wt0zgocYiTAY6jdR8oyJXjuzmhaEyrbDgPWZeeMxz0ehZyQyv8FMcouGJObT5MGbAkpexxk4ix0Tvufpotj/ZGOOOJ4FgMkL/YYmYp+s9AeRs/Zm2KscTerpRXvajf8IqHl7cOp4/aR22flcJ/1LgSxY7RS3UthnhCZ8VIz/zk6Z9LzPV4yOGdJf6McvJqI31O+AbZkrOdqQpKGd x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(346002)(396003)(366004)(136003)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(9686003)(8936002)(26005)(478600001)(110136005)(86362001)(52536014)(8676002)(4326008)(41300700001)(15650500001)(2906002)(44832011)(5660300002)(33656002)(76116006)(38070700009)(64756008)(66556008)(66446008)(66946007)(66476007)(6636002)(316002)(53546011)(71200400001)(6506007)(7696005)(38100700002)(55016003)(83380400001)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?I0Zwr8+xWwbFppp0Ny3p32YtvK7qsaIZJbuasQyWUPPfOpmy7tsKw0UexBnM?= =?us-ascii?Q?/rXBeuW7jisOq338b8H4LrvslJL1OA5datoO6dyKWTG2BUhEHb+b7FtfAVMD?= =?us-ascii?Q?j6sRVsI7Yf/XkoxVWup2EEjKARLfO1Abz2IOuryng+fF5LLFMkW8IwBCc3d9?= =?us-ascii?Q?b9zpDL/sqIxMpUUNq9XjFsxlGXta553+WWXwZDUPRedMC5IBp/8UaUOy1Su3?= =?us-ascii?Q?ca5NxNG47mt4rXdERXGyyTqpkFYLksAwUnWXk4qgHKZi0BsZBvKva5E/W7de?= =?us-ascii?Q?9la3Vow4FfD2998CSEgF+2NDycX9B78k5QqDIgd/3bnhEnRoYW1Son2F14ri?= =?us-ascii?Q?RbFEuCWihFXq2I8mE1rBUabxI/4PQB3VjfywK+b4B9LShmGdmu9dWNQdR7IS?= =?us-ascii?Q?z4S7EQINKG0cowrkDvic+1/Z9lnWxUObzCuRLiNrrh0QIZBRFkYgqazrxRsc?= =?us-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GMB+Mgp78G7uZkTsyo?= =?us-ascii?Q?oHj6ylAMvQ0w9TGt/fSnLsG6l5MoGGIhIPPJLBMbM8ApPbm0vfgO4oQBkESl?= =?us-ascii?Q?fGC3DS64mQYuO+AuRFVl0Ebb6IbeLA2CDc4FzR4ElQKJRXWUdC3gYtXLJj8A?= =?us-ascii?Q?FSGAHHzpaFvt1UC6HD6sVAPuPr2JUE+SNVfwoMCG03SFWOMJF9DC137dl9ED?= =?us-ascii?Q?GLg9vPIV987GTyEwtzAV8Bi7tyI200Yh7lHZ+cNF?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56eaf9f1-bf15-4176-7208-08dbe584a74c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2023 02:43:30.7771 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: I0ipeBU6FOg5Q3zDIpOPqWRlTvUnv0LUm6Gkb+MdHP3REXfHwHD/8LH3ScjnTFM6Phe0tHUSz/mb2TEZbo+zqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8645 X-Mailman-Approved-At: Wed, 15 Nov 2023 10:40:55 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Sachin Saxena > -----Original Message----- > From: Chengwen Feng > Sent: 10 November 2023 03:31 PM > To: thomas@monjalon.net; ferruh.yigit@amd.com; Hemant Agrawal > ; Sachin Saxena ; > Shreyansh Jain > Cc: dev@dpdk.org > Subject: [PATCH v2 03/16] bus/fslmc: verify strdup return value >=20 > Add verify strdup return value logic. >=20 > Fixes: e67a61614d0b ("bus/fslmc: support device iteration") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengwen Feng > --- > drivers/bus/fslmc/fslmc_bus.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.= c > index 57bfb5111a..89f0f329c0 100644 > --- a/drivers/bus/fslmc/fslmc_bus.c > +++ b/drivers/bus/fslmc/fslmc_bus.c > @@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char > *str, >=20 > /* Now that name=3Ddevice_name format is available, split */ > dup =3D strdup(str); > + if (dup =3D=3D NULL) { > + DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str); > + return NULL; > + } > dev_name =3D dup + strlen("name=3D"); >=20 > if (start !=3D NULL) { > -- > 2.17.1