iwinfo: Fix rate buffer size

This string could be truncated for higher rates.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2019-09-01 19:43:40 +02:00
parent 71ec9be506
commit f599a8dc01

View file

@ -130,7 +130,7 @@ static char * format_noise(int noise)
static char * format_rate(int rate) static char * format_rate(int rate)
{ {
static char buf[14]; static char buf[18];
if (rate <= 0) if (rate <= 0)
snprintf(buf, sizeof(buf), "unknown"); snprintf(buf, sizeof(buf), "unknown");