summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/x509.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-14 15:44:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-14 15:44:07 +0000
commit7c821ac788850aab081c1e7bd587a17536532ecf (patch)
treefb77569f185b3831a2fadba4d1899b5e2c92b0fe /sbin/isakmpd/x509.c
parent3c000c60529c8aa5b53e9b28f8eb17e9e0c4602d (diff)
fix parameter types for x509 routines
ok mikeb
Diffstat (limited to 'sbin/isakmpd/x509.c')
-rw-r--r--sbin/isakmpd/x509.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/isakmpd/x509.c b/sbin/isakmpd/x509.c
index 73fe4fa5306..34e9d398b50 100644
--- a/sbin/isakmpd/x509.c
+++ b/sbin/isakmpd/x509.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.c,v 1.114 2013/10/27 18:54:03 guenther Exp $ */
+/* $OpenBSD: x509.c,v 1.115 2013/11/14 15:44:06 deraadt Exp $ */
/* $EOM: x509.c,v 1.54 2001/01/16 18:42:16 ho Exp $ */
/*
@@ -1334,10 +1334,11 @@ char *
x509_DN_string(u_int8_t *asn1, size_t sz)
{
X509_NAME *name;
- u_int8_t *p = asn1;
+ const u_int8_t *p = asn1;
char buf[256]; /* XXX Just a guess at a maximum length. */
+ long len = sz;
- name = d2i_X509_NAME(NULL, &p, sz);
+ name = d2i_X509_NAME(NULL, &p, len);
if (!name) {
log_print("x509_DN_string: d2i_X509_NAME failed");
return 0;