Fix bug in eap_ttls_avp_encapsulate() when >248 bytes are encapsulated.
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Wed, 15 Feb 2012 20:22:26 +0000 (15:22 -0500)
committerSam Hartman <hartmans@debian.org>
Tue, 19 Mar 2013 17:02:29 +0000 (13:02 -0400)
src pointer wasn't being advanced, so the first 248 bytes were duplicated
in place of the remainder of the message.

libeap/src/eap_peer/eap_ttls.c

index 855ce49..ef966cb 100644 (file)
@@ -288,6 +288,7 @@ static int eap_ttls_avp_vsa_encapsulate(struct wpabuf **resp, u32 vendor,
                                       avp_size);
                os_memcpy(pos, src, avp_size);
                pos += avp_size;
+               src += avp_size;
                AVP_PAD(avp, pos);
                wpabuf_put(msg, pos - avp);
                avp = pos;