Re: [dpdk-dev] [PATCH] eal: fix off-by-one error in hotplug add

2017-08-04 Thread Thomas Monjalon
04/08/2017 17:30, Gaetan Rivet: > snprintf returns the length it would have written had the given length > been enough, *terminating null byte excluded*. > > It will however limit the length of its writing to given length minus > one, and always put a terminating null-byte at the end of the string

[dpdk-dev] [PATCH] eal: fix off-by-one error in hotplug add

2017-08-04 Thread Gaetan Rivet
snprintf returns the length it would have written had the given length been enough, *terminating null byte excluded*. It will however limit the length of its writing to given length minus one, and always put a terminating null-byte at the end of the string. This must be taken into account when ca