Re: [PATCH] Fix bugs in [v]snprintf usage.

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

 



On Wed, Jan 30 2013, Ken Raeburn wrote:
> 
> When calling snprintf, supply the full buffer size instead of
> (usually) one byte less.
> 
> When using the returned length from vsnprintf for logging, don't write
> more than the actual buffer size (minus one for the trailing \0), in
> case the formatted string was truncated.

Thanks Ken, applied.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux