commit | ad1fe0d8e976a5f7815f930fddfa1d94114c3fa8 | [log] [tgz] |
---|---|---|
author | Daniel Borkmann <daniel@iogearbox.net> | Fri May 29 21:47:45 2015 +0200 |
committer | Stephen Hemminger <shemming@brocade.com> | Wed Jun 24 23:34:20 2015 -0400 |
tree | 91ec9871b16247880a65a394b6e2745bd9e807e6 | |
parent | 518af1e0b14cdc8eeac4db313767f5d1dfd1fce1 [diff] |
tc: util: fix print_rate for ludicrous speeds The for loop should only probe up to G[i]bit rates, so that we end up with T[i]bit as the last max units[] slot for snprintf(3), and not possibly an invalid pointer in case rate is multiple of kilo. Fixes: 8cecdc283743 ("tc: more user friendly rates") Reported-by: Jose R. Guzman Mosqueda <jose.r.guzman.mosqueda@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>