Re: [arptables PATCH 2/3] Eliminate compiler warning about size passed to strncmp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 21, 2019 at 12:15:58PM +0100, Phil Sutter wrote:
> Gcc complains about the size being equal to destination size, despite
> the nul character being explicitly set in following line.
> 
> Reduce size by one to make gcc happy. While being at it, drop the
> explicit nul character assignment - it is not needed as the buffer was
> allocated by calloc().
> 
> Fixes: 8f586939999e0 ("fix potential buffer overflows reported by static analysis")
> Signed-off-by: Phil Sutter <phil@xxxxxx>

Acked-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux