summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_lib.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2019-03-04 16:46:44 +0000
committermillert <millert@openbsd.org>2019-03-04 16:46:44 +0000
commit1b66b0a815b1ee6eca7c1d4157926109239ea3f3 (patch)
treec5234b9d62ecd700a2eefef856f0a83fe96a44bb /lib/libssl/tls13_lib.c
parentBUGS goes last; (diff)
downloadwireguard-openbsd-1b66b0a815b1ee6eca7c1d4157926109239ea3f3.tar.xz
wireguard-openbsd-1b66b0a815b1ee6eca7c1d4157926109239ea3f3.zip
Don't index a void pointer, fixes compilation with visual studio.
Gcc/clang will treat void * as char * but this is non-standard. OK deraadt@ jsing@ inoguchi@
Diffstat (limited to 'lib/libssl/tls13_lib.c')
-rw-r--r--lib/libssl/tls13_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/tls13_lib.c b/lib/libssl/tls13_lib.c
index fb75419ac53..60fa3729447 100644
--- a/lib/libssl/tls13_lib.c
+++ b/lib/libssl/tls13_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_lib.c,v 1.9 2019/02/28 18:20:38 jsing Exp $ */
+/* $OpenBSD: tls13_lib.c,v 1.10 2019/03/04 16:46:44 millert Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
@@ -267,9 +267,10 @@ tls13_legacy_read_bytes(SSL *ssl, int type, unsigned char *buf, int len, int pee
}
int
-tls13_legacy_write_bytes(SSL *ssl, int type, const void *buf, int len)
+tls13_legacy_write_bytes(SSL *ssl, int type, const void *vbuf, int len)
{
struct tls13_ctx *ctx = ssl->internal->tls13;
+ const uint8_t *buf = vbuf;
size_t n, sent;
ssize_t ret;