aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls/tls_eap.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-08-30 11:46:14 +0200
committerMartin Willi <martin@revosec.ch>2012-09-12 13:19:52 +0200
commitacada66a351b4cc78dbd0d0210b74c902dbd24d7 (patch)
treefe18db3ca42bc3f40ef9acf59f9694b6e3b7b72b /src/libtls/tls_eap.c
parentfb3cf1b70815b65d0a07427f773d34b8e6afee38 (diff)
downloadstrongswan-acada66a351b4cc78dbd0d0210b74c902dbd24d7.tar.bz2
strongswan-acada66a351b4cc78dbd0d0210b74c902dbd24d7.tar.xz
Use memmove on overlapping regions, and operate with correct sizeof()
Diffstat (limited to 'src/libtls/tls_eap.c')
-rw-r--r--src/libtls/tls_eap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtls/tls_eap.c b/src/libtls/tls_eap.c
index 30533902a..928aadcb3 100644
--- a/src/libtls/tls_eap.c
+++ b/src/libtls/tls_eap.c
@@ -275,8 +275,8 @@ static status_t build_pkt(private_tls_eap_t *this, chunk_t *out)
else
{
/* get rid of the reserved length field */
- memcpy(buf+sizeof(eap_packet_t),
- buf+sizeof(eap_packet_t)+sizeof(u_int32_t), len);
+ memmove(buf + sizeof(eap_tls_packet_t),
+ buf + sizeof(eap_tls_packet_t) + sizeof(u_int32_t), len);
}
}
len += sizeof(eap_tls_packet_t);