aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-07 10:52:59 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-08 09:42:07 (GMT)
commit1f102d3bb0b4621e32d3402a6e42a97a71d707d4 (patch)
treeb279a31052f7831817553376ad8901cf7fc67d99 /src/rsn_supp
parenteeab4f2fdaf20b23f1c27c5ce7f655442e2f7902 (diff)
downloadhostap-1f102d3bb0b4621e32d3402a6e42a97a71d707d4.zip
hostap-1f102d3bb0b4621e32d3402a6e42a97a71d707d4.tar.gz
hostap-1f102d3bb0b4621e32d3402a6e42a97a71d707d4.tar.bz2
Check os_snprintf() result more consistently - manual
This converts os_snprintf() result validation cases to use os_snprintf_error() for cases that were note covered by spatch and semantic patches. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/wpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 9caf778..7c2761c 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -2042,7 +2042,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, char *buf, size_t buflen)
RSN_SUITE_ARG(wpa_cipher_to_suite(sm->proto,
sm->group_cipher)),
sm->dot11RSNA4WayHandshakeFailures);
- if (ret >= 0 && (size_t) ret < buflen)
+ if (!os_snprintf_error(buflen - len, ret))
len += ret;
return (int) len;