From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] string: fix potential seg fault on snprintf Date: Fri, 27 Jun 2014 13:30:03 +0200 Message-ID: <53AD55BB.8090807@6wind.com> References: <1403867097-18848-1-git-send-email-pablox.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Pablo de Lara , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1403867097-18848-1-git-send-email-pablox.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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