From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0F6CA09FF; Wed, 6 Jan 2021 16:55:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A95531609BD; Wed, 6 Jan 2021 16:55:55 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 53D2D1609B7 for ; Wed, 6 Jan 2021 16:55:54 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id c22so2463676pgg.13 for ; Wed, 06 Jan 2021 07:55:54 -0800 (PST) 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=DuXf2i7kI6KlzOELyTq9tI0XulWwRHb3HxVc3Rck1Kw=; b=g9e+RCrjDSQRFiVbZP+w+4U9Tqhf0+LdLywPt6NhZYPpyn91oDRWFPbS3K4CWUfV2V LYuZY5nSJmTmcxTh/aI+4KkQ2o7o1QsvvJW2YrLQWU8cCqzDkQB52DtXG1Xxl2mffsT3 EG0m40Oql3FAuBtaz904KmJOVXQ6QlXZ/Cmrm24mYGLLqfYpcmAr+lFSoZrmjtaOwfTD GqhfyplVfG0YBYieoaABPFl/t7tHk6LMnmZYVe80jyL2R4HiPOI6wDAh8iazHC64eti9 vAI4vM02+vXmakY2R8RFn+cC43J0WFIyNGcM5WFVjwXbXX7iR4lJoEw8s/l/Qh5GkJfI YBhg== 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=DuXf2i7kI6KlzOELyTq9tI0XulWwRHb3HxVc3Rck1Kw=; b=SycxETNdRepXzjmGwoq2J7TOnTT1Z9LbBgQt6inIGIvIWWK0JDEg1BHpEdTjVMcx+F 21zaLEJ3hWgWYfFTdghdJQI5IwYWfUq9mb/3U51AMl/wN1JlNqE6HOsXT9su1apfBuDU rXNaaufldhJzg55xaq6D1P9CqCJgpPhpUWH2EBU7ps+1AZ3tVOV9ALNWYFCht8+/BL2o /0NkaT0wffaHmFI1ytAlI9Chisx97q60M6bsIlfBvAoduZxTfXM4USmpB1/1P4Bbmm0F YACOZgjyNrw/hHuxwc8q+v1hCE4gNbDvJe8G67zEEvmvRtNb4m6cNZr9HbV3DCW2nLsW T4nw== X-Gm-Message-State: AOAM530sWwhLI/rpuXs9B/DSevxFUc6QZU2Ku3MLCkDJz1iu582BG5GT uclmdYtugcJ3FJtEdoB2St24Mw== X-Google-Smtp-Source: ABdhPJzUlgB05duTgk4b/j1WcP16H42MrmQn4faw1f2nygOG90Ic61qMBZKQzb9hcFlVgIEw8VkQAQ== X-Received: by 2002:a63:5460:: with SMTP id e32mr5207155pgm.59.1609948553607; Wed, 06 Jan 2021 07:55:53 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id a19sm2884354pfi.130.2021.01.06.07.55.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 07:55:53 -0800 (PST) Date: Wed, 6 Jan 2021 07:55:50 -0800 From: Stephen Hemminger To: Jiawei Wang Cc: ferruh.yigit@intel.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, orika@nvidia.com, viacheslavo@nvidia.com, thomas@monjalon.net, rasland@nvidia.com, dev@dpdk.org Message-ID: <20210106075550.1565ca32@hermes.local> In-Reply-To: <1609942417-259610-1-git-send-email-jiaweiw@nvidia.com> References: <1606129239-379967-1-git-send-email-jiaweiw@nvidia.com> <1609942417-259610-1-git-send-email-jiaweiw@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump overlapping 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 Sender: "dev" On Wed, 6 Jan 2021 16:13:37 +0200 Jiawei Wang wrote: > + int buf_size = MAX_STRING_LEN; > + char print_buf[buf_size]; Don't use dynamic sized array if you don't have to. Various static checkers can see look for out of bounds access to fixed size array.