From: Eliad Peller Date: Wed, 30 Mar 2011 14:08:42 +0000 (+0300) Subject: P2P: add a missing 'return' after building IE from an empty string X-Git-Tag: hostap-1-bp~440 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72863ea7c6a1575b25f79c44a9c5ba2bc6a45c60;p=thirdparty%2Fhostap.git P2P: add a missing 'return' after building IE from an empty string When building IE from an empty string and CONFIG_WPS_STRICT is not defined, redundant 2 bytes are being added to the string. We have to return right after building the "dummy" string. Signed-off-by: Eliad Peller --- diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c index 42acc67bc..c34db9152 100644 --- a/src/p2p/p2p_build.c +++ b/src/p2p/p2p_build.c @@ -346,6 +346,7 @@ static void p2p_add_wps_string(struct wpabuf *buf, enum wps_attribute attr, */ wpabuf_put_be16(buf, 1); wpabuf_put_u8(buf, ' '); + return; } #endif /* CONFIG_WPS_STRICT */ wpabuf_put_be16(buf, len);