Check os_snprintf() result more consistently - more checks

Add more os_snprintf() result validation checks.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-07 15:45:02 +02:00
parent 1d39977136
commit aaadd72733
3 changed files with 10 additions and 1 deletions

View file

@ -1120,6 +1120,8 @@ int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen)
(flags & WLAN_STA_VHT ? "[VHT]" : ""),
(flags & WLAN_STA_WNM_SLEEP_MODE ?
"[WNM_SLEEP_MODE]" : ""));
if (os_snprintf_error(buflen, res))
res = -1;
return res;
}