summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpki-client
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2020-04-16 11:25:43 +0000
committerclaudio <claudio@openbsd.org>2020-04-16 11:25:43 +0000
commit541ce356f5052d08936d581dbf4709c7d8599b62 (patch)
treecd1b4c8468001035d3f912c265459d0031580bb0 /usr.sbin/rpki-client
parentAdd -q option to suppress output when setting variables, as does mixerctl (diff)
downloadwireguard-openbsd-541ce356f5052d08936d581dbf4709c7d8599b62.tar.xz
wireguard-openbsd-541ce356f5052d08936d581dbf4709c7d8599b62.zip
Replace deprecated ERR_remove_state(0) with ERR_remove_thread_state(NULL);
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r--usr.sbin/rpki-client/ip.c9
-rw-r--r--usr.sbin/rpki-client/main.c4
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/rpki-client/ip.c b/usr.sbin/rpki-client/ip.c
index 611be6d6226..2ec86c709a4 100644
--- a/usr.sbin/rpki-client/ip.c
+++ b/usr.sbin/rpki-client/ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip.c,v 1.9 2019/11/27 17:18:24 deraadt Exp $ */
+/* $OpenBSD: ip.c,v 1.10 2020/04/16 11:25:43 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -41,8 +41,7 @@
int
ip_addr_afi_parse(const char *fn, const ASN1_OCTET_STRING *p, enum afi *afi)
{
- char buf[2];
- short v;
+ uint16_t v;
if (p->length == 0 || p->length > 3) {
warnx("%s: invalid field length, want 1--3, have %d",
@@ -50,8 +49,8 @@ ip_addr_afi_parse(const char *fn, const ASN1_OCTET_STRING *p, enum afi *afi)
return 0;
}
- memcpy(buf, p->data, sizeof(uint16_t));
- v = ntohs(*(uint16_t *)buf);
+ memcpy(&v, p->data, sizeof(v));
+ v = ntohs(v);
/* Only accept IPv4 and IPv6 AFIs. */
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c
index aaacb7b8bb2..ecedc0f9b5a 100644
--- a/usr.sbin/rpki-client/main.c
+++ b/usr.sbin/rpki-client/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.61 2020/04/01 14:15:49 claudio Exp $ */
+/* $OpenBSD: main.c,v 1.62 2020/04/16 11:25:43 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1250,7 +1250,7 @@ out:
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
- ERR_remove_state(0);
+ ERR_remove_thread_state(NULL);
ERR_free_strings();
exit(rc);