summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-08-11 19:13:35 +0000
committerjsing <jsing@openbsd.org>2020-08-11 19:13:35 +0000
commitb7c5dcbcb55dd3803d4adb34b88f80b449705e2b (patch)
tree81d941938c771416cd121e215f46290b95a3be24
parentUse SSL3_SEQUENCE_SIZE for last_write_sequence[] rather than hardcoding. (diff)
downloadwireguard-openbsd-b7c5dcbcb55dd3803d4adb34b88f80b449705e2b.tar.xz
wireguard-openbsd-b7c5dcbcb55dd3803d4adb34b88f80b449705e2b.zip
Use 0 instead of 0x00 for memset() calls.
ok inoguchi@ tb@
-rw-r--r--lib/libssl/d1_both.c8
-rw-r--r--lib/libssl/d1_pkt.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index 8f3cc610b89..4a2e41b21b1 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_both.c,v 1.57 2019/02/10 16:42:35 phessler Exp $ */
+/* $OpenBSD: d1_both.c,v 1.58 2020/08/11 19:13:35 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -417,7 +417,7 @@ dtls1_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
}
msg_hdr = &D1I(s)->r_msg_hdr;
- memset(msg_hdr, 0x00, sizeof(struct hm_header_st));
+ memset(msg_hdr, 0, sizeof(struct hm_header_st));
again:
i = dtls1_get_message_fragment(s, st1, stn, max, ok);
@@ -441,7 +441,7 @@ again:
s->internal->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, p, msg_len,
s, s->internal->msg_callback_arg);
- memset(msg_hdr, 0x00, sizeof(struct hm_header_st));
+ memset(msg_hdr, 0, sizeof(struct hm_header_st));
/* Don't change sequence numbers while listening */
if (!D1I(s)->listen)
@@ -1249,7 +1249,7 @@ dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr)
void
dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr)
{
- memset(ccs_hdr, 0x00, sizeof(struct ccs_header_st));
+ memset(ccs_hdr, 0, sizeof(struct ccs_header_st));
ccs_hdr->type = *(data++);
}
diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c
index dd7d9aa76c6..9ea694f605c 100644
--- a/lib/libssl/d1_pkt.c
+++ b/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_pkt.c,v 1.78 2020/08/09 16:02:58 jsing Exp $ */
+/* $OpenBSD: d1_pkt.c,v 1.79 2020/08/11 19:13:35 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -1370,7 +1370,7 @@ dtls1_dispatch_alert(SSL *s)
S3I(s)->alert_dispatch = 0;
- memset(buf, 0x00, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
*ptr++ = S3I(s)->send_alert[0];
*ptr++ = S3I(s)->send_alert[1];
@@ -1430,12 +1430,12 @@ dtls1_reset_seq_numbers(SSL *s, int rw)
seq = S3I(s)->read_sequence;
D1I(s)->r_epoch++;
memcpy(&(D1I(s)->bitmap), &(D1I(s)->next_bitmap), sizeof(DTLS1_BITMAP));
- memset(&(D1I(s)->next_bitmap), 0x00, sizeof(DTLS1_BITMAP));
+ memset(&(D1I(s)->next_bitmap), 0, sizeof(DTLS1_BITMAP));
} else {
seq = S3I(s)->write_sequence;
memcpy(D1I(s)->last_write_sequence, seq, sizeof(S3I(s)->write_sequence));
D1I(s)->w_epoch++;
}
- memset(seq, 0x00, seq_bytes);
+ memset(seq, 0, seq_bytes);
}