[PATCH v5 20/22] cfgfile: fix section count with no name

fengchengwen fengchengwen at huawei.com
Tue Aug 12 03:53:08 CEST 2025


Acked-by: Chengwen Feng <fengchengwen at huawei.com>

On 7/23/2025 9:31 PM, David Marchand wrote:
> Passing a NULL to strncmp is incorrect.
> 
>  + ------------------------------------------------------- +
>  + Test Suite : Test Cfgfile Unit Test Suite
>  + ------------------------------------------------------- +
> ../lib/cfgfile/rte_cfgfile.c:475:7: runtime error: null pointer passed as
> 	argument 2, which is declared to never be null
> 
> On the other hand, it seems the intent was to count all sections, so
> skip the whole loop and section name comparisons.
> 
> Fixes: c54e7234bc9e ("test/cfgfile: add basic unit tests")
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>



More information about the dev mailing list