From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 883F5A00BE; Mon, 27 Apr 2020 18:58:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 646F41D55D; Mon, 27 Apr 2020 18:58:42 +0200 (CEST) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id DD8231D528 for ; Mon, 27 Apr 2020 18:58:40 +0200 (CEST) Received: by mail-pj1-f65.google.com with SMTP id ms17so7696695pjb.0 for ; Mon, 27 Apr 2020 09:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OJSBH17UobxHuiLrmiKkbxZDTBDq8TIPs1RaDQuAWro=; b=gkV/tQMflDDVV4YHmsvzkkOAOohMn3YpJw7dRu2Ysn5dKQ5Q3beWz/T+6mlzudwahr PDfWQ7Dzy8Slq7npZaL4YKjTjPMcmL6oKaKe0yv2JlM4oOHLbG0XweSp3jukr55H7/2A lV482dOL0O+bQvXzrMmAfHO4/DKb/yhV2GXvL+EwumilYYdxMKajcmJTp7RWbU7AQYcc ii/TrbWi/FC1LG3hbmOJaH6QqjQ2ZbaNcqxZyBCDU0cwJX4eiAU/U1YkJ4ew5di4BRQO Mz85nDtQpzRRHir8POFg9na56ZQVvS9jLNlj2NV8ekRYYAc25wPXI2G0VNA/5p3YZRkZ F7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OJSBH17UobxHuiLrmiKkbxZDTBDq8TIPs1RaDQuAWro=; b=CQO3FggXQcQF3h6BWn42T8UN9l+YRnZPHrI311Ck9y8oseNQnrn2eeUA3gBrGqfTYv 4qan/+Zs3ZorD3NCyQUrPkdRM0hcXEBG2gqCibUzNB0Akj5sPm7mDytzdUxDLGEyftaI WXkvkwV3KgyF6xpg6kZKuYiI9uODVicxnXbs6T66JxjaCNnl+I4v/CJh7nmp0GFuwSSd Yfz+C81tJaF0McRVyQoW8eViHG5nJyStIyK6gIa/ugNI+gofW1niWJVIaWYd+AywOjGU 6fiQsExUZIREp0HFytWnTbS+bS1tFRo6fKI+dXzR05yBbaqmz+3HrNuG+G4H/9jKAbbB C9sw== X-Gm-Message-State: AGi0PuYgKD5dIZKC8IrTE20wQ7GxwVpJIexwLw2nbIZTzoZcex20vB+U A7z54QKl/nAY7ADW4ov9Z45pFQ== X-Google-Smtp-Source: APiQypJESqsDfXUXF8Nalg+4h+XvNyIxAtm9JAidvSuMn/HGCxzYG0uKDhk8bP2lWlo+cZCFdtCrrg== X-Received: by 2002:a17:90a:c385:: with SMTP id h5mr10172488pjt.52.1588006720034; Mon, 27 Apr 2020 09:58:40 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id p8sm11718368pjd.10.2020.04.27.09.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 09:58:39 -0700 (PDT) Date: Mon, 27 Apr 2020 09:58:36 -0700 From: Stephen Hemminger To: Phil Yang Cc: jerinj@marvell.com, skori@marvell.com, dev@dpdk.org, david.marchand@redhat.com, lijian.zhang@arm.com, ruifeng.wang@arm.com, nd@arm.com Message-ID: <20200427095836.4cc5bbad@hermes.lan> In-Reply-To: <1588006058-10728-1-git-send-email-phil.yang@arm.com> References: <1588006058-10728-1-git-send-email-phil.yang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] trace: fix build with gcc 10 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 28 Apr 2020 00:47:38 +0800 Phil Yang wrote: > - if (strlen(optarg) >= size) { > + /* the specified trace directory name cannot > + * exceed PATH_MAX-1. > + */ > + if (strlen(optarg) >= (size - 1)) { > trace_err("input string is too big"); strnlen() is useful for these kinds of cases.