From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 212B2682E for ; Fri, 27 Jun 2014 13:28:32 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1X0UMl-0003u0-99; Fri, 27 Jun 2014 13:30:54 +0200 Message-ID: <53AD55BB.8090807@6wind.com> Date: Fri, 27 Jun 2014 13:30:03 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Pablo de Lara , dev@dpdk.org References: <1403867097-18848-1-git-send-email-pablox.de.lara.guarch@intel.com> In-Reply-To: <1403867097-18848-1-git-send-email-pablox.de.lara.guarch@intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] string: fix potential seg fault on snprintf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 11:28:32 -0000 Hello Pablo, On 06/27/2014 01:04 PM, Pablo de Lara wrote: > From: Pablo de Lara > > Several functions did not check if destination buffer, used > in snprintf was a non-NULL pointer. Did you noticed any issue without this patch? It seems that all the get_help() cmdline functions are never called with a NULL destination buffer (see in cmdline_parse.c). I think it is useless to add this test as there is no good reason to give a NULL argument. It is like testing that the arguments of strcpy() are non-NULL. I would say the same for pci_get_uio_dev(). Regards, Olivier