Re: [nft PATCH 2/2] nfnl_osf: Silence string truncation gcc warnings

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

 



On Sat, Jul 20, 2019 at 09:36:28PM +0200, Florian Westphal wrote:
> Phil Sutter <phil@xxxxxx> wrote:
> > Albeit a bit too enthusiastic, gcc is right in that these strings may be
> > truncated since the destination buffer is smaller than the source one.
> > Get rid of the warnings (and the potential problem) by specifying a
> > string "precision" of one character less than the destination. This
> > ensures a terminating nul-character may be written as well.
> 
> Fernando sent a patch for this already, with the notable difference
> of altering the size of the destination buffer by one.

Ah, thanks! I missed it. Replied to it pointing at my patch, also
spotted a typo in his patch. :)

Cheers, Phil



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

  Powered by Linux