Re: [PATCH] Cleanup: snprintf() always NUL-terminates: depend on it

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

 



On Sun, Jan 04, 2015 at 19:05:58 +0100, Giel van Schijndel wrote:
> Especially since one very strange piece of code seems to be written in
> such a way that a NUL needs to be placed where a NUL is present already.
> The author probably meant to fill the last byte of the buffer with a NUL
> instead. But regardless of that: that isn't necessary since snprintf()
> already guarantees NUL termination for buffers sizes > 0 and <= INT_MAX.
> ---

Forgot to:
Signed-off-by: Giel van Schijndel <me@xxxxxxxxx>

-- 
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
--
Of course I talk to myself. Sometimes I need expert advice.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux