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 4678CA10DA for ; Wed, 31 Jul 2019 21:57:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A33CF1BEF4; Wed, 31 Jul 2019 21:57:37 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 800451BEE6 for ; Wed, 31 Jul 2019 21:57:35 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id i10so25692380iol.13 for ; Wed, 31 Jul 2019 12:57:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y1yHcgAesEdKjS9CUrCjax/uxtx97clkuJPv8R3xKF0=; b=gxOvL5bverrhCv2xFdxTLI7suk8xqon3beV/0QVE5IZxH8EI3Pil8kRRGLrRH0BBo8 OaKnWHrIZ99OlztHN6S6HABEozThlUn5t1FMNYGKnQGYks5x3sGsIXy9N84ZISiVGhSp kpX/7sgKEKv8Kup7Ro7LaPcvikKCk7e9SrXgXtFK5QbWpGu868+in5rKWEg8ZFZTxldt 7WOxZaZ3N5qcawZ054+93fVNrxr1URTEESckCUMeJXkrCO2wD09KRhl/5dM1wZIZEhGs sFv24BGVEbUVfzC2LrApvO9/mOOHGd1oacXTraZ0HGDTIhudbuOXgJA2G9KHEBmKZl7A bu4g== X-Gm-Message-State: APjAAAWPzn1kTiAmeh33jIrR8o4l34aWG4Hxjr5GUMo6bkRHdZ3ZQi78 EQCPqtAB92CxBmg7ftHWx0hJFQfRLFlF/gvZ6eEWeQ== X-Google-Smtp-Source: APXvYqwfh+s2iFniEgZhseTBjOt22HgD6AB7lNQIJUlR0k3LlO+aunRUIe9NySk7s87ZkHHVAJmhd/qzGTOzkd+O1ZI= X-Received: by 2002:a05:6638:691:: with SMTP id i17mr128188780jab.70.1564603054880; Wed, 31 Jul 2019 12:57:34 -0700 (PDT) MIME-Version: 1.0 References: <1564599390-9684-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <1564599390-9684-1-git-send-email-david.marchand@redhat.com> From: Michael Santana Francisco Date: Wed, 31 Jul 2019 15:57:23 -0400 Message-ID: To: David Marchand Cc: dev , Aaron Conole Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] test/eal: fix incorrect array sizes 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 Wed, Jul 31, 2019 at 2:56 PM David Marchand wrote: > > Following removal of -c and -n options, the array should have been > shrunk to avoid launch_proc to access unitialised strings. > > Fixes: b4dbacdb1ad7 ("test/eal: set core mask/list config only in dedicated test") > Fixes: 501fa9a40298 ("test/eal: set memory channel config only in dedicated test") > > Signed-off-by: David Marchand Good patch, but is it just me or are you off by one in some places? see inline > --- > app/test/test_eal_flags.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c > index 827ea88..5b2c0f5 100644 > --- a/app/test/test_eal_flags.c > +++ b/app/test/test_eal_flags.c > @@ -244,7 +244,7 @@ test_whitelist_flag(void) > snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp); > #endif > > - const char *wlinval[][11] = { > + const char *wlinval[][7] = { Shoudln't this be wlinval[][6]? > {prgname, prefix, mp_flag, > pci_whitelist, "error", "", ""}, > {prgname, prefix, mp_flag, > @@ -310,7 +310,7 @@ test_invalid_b_flag(void) > snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp); > #endif > > - const char *blinval[][9] = { > + const char *blinval[][5] = { blinval[][6]? > {prgname, prefix, mp_flag, "-b", "error"}, > {prgname, prefix, mp_flag, "-b", "0:0:0"}, > {prgname, prefix, mp_flag, "-b", "0:error:0.1"}, > @@ -414,7 +414,7 @@ test_invalid_r_flag(void) > snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp); > #endif > > - const char *rinval[][9] = { > + const char *rinval[][5] = { rinval[][4]? > {prgname, prefix, mp_flag, "-r", "error"}, > {prgname, prefix, mp_flag, "-r", "0"}, > {prgname, prefix, mp_flag, "-r", "-1"}, > -- > 1.8.3.1 >