]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wolfssl: Avoid void pointer arithmetic
authorJouni Malinen <jouni@codeaurora.org>
Mon, 5 Aug 2019 21:54:28 +0000 (00:54 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 6 Aug 2019 10:12:37 +0000 (13:12 +0300)
This is a compiler specific extension and not compliant with the C
standard.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/crypto/tls_wolfssl.c

index 83704fffa4114a49dd1410d7b4a35479202273c7..d222d142767d2fcc9ac818b309ccfd06fc9beda4 100644 (file)
@@ -141,7 +141,7 @@ static int wolfssl_receive_cb(WOLFSSL *ssl, char *buf, int sz, void *ctx)
        if (get > (wpabuf_len(data->in_data) - data->consumed))
                get = wpabuf_len(data->in_data) - data->consumed;
 
-       os_memcpy(buf, wpabuf_head(data->in_data) + data->consumed, get);
+       os_memcpy(buf, wpabuf_head_u8(data->in_data) + data->consumed, get);
        data->consumed += get;
 
        if (get == 0)