WPS: Add explicit message length limit of 50000 bytes
authorJouni Malinen <j@w1.fi>
Sun, 23 Nov 2014 18:57:34 +0000 (20:57 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 23 Nov 2014 19:03:40 +0000 (21:03 +0200)
commitadf96fb66b1f0606b8d4f4f5e01e33a10c95ee07
tree7604758d216cc7d7fc3b6d7c43c3e4fa4a5838c8
parent5c6787a6cab23c9814db25ef26f5366d4f699330
WPS: Add explicit message length limit of 50000 bytes

Previously, this was implicitly limited by the 16-bit length field to
65535. This resulted in unhelpful static analyzer warnings (CID 62868).
Add an explicit (but pretty arbitrary) limit of 50000 bytes to avoid
this. The actual WSC messages are significantly shorter in practice, but
there is no specific protocol limit, so 50000 is as good as any limit to
use here.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/eap_peer/eap_wsc.c
src/eap_server/eap_server_wsc.c