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

Thomas Monjalon thomas at monjalon.net
Fri Aug 4 18:12:02 CEST 2017


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.
> 
> This must be taken into account when calculating the total length of the
> device declaration string.
> 
> Fixes: 3054036f054a ("eal: fix possible crash in hotplug")
> 
> Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
> ---
> 
> Charybdis -> Scylla

Oiseau de mauvais augure :)
The best is the enemy of the good.

Applied, thanks


More information about the dev mailing list