diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2014-12-05 13:40:45 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2014-12-05 13:40:45 +0000 |
commit | 2da2dda9f8ee5a1a99653152e9fb256d743b4690 (patch) | |
tree | 10958b11b0cbfd9e2dfc42a07e6f7be5538b2dd9 /sbin/iked | |
parent | 12a07b3f5155a96a4179c8a3231228e51dad71e8 (diff) |
Store return value of i2d_X509_NAME in a signed integer to make
sure the negative error gets treated correctly and doesn't get
accidentally promoted to a huge unsigned value.
From Pedro Martelletto, thanks! OK reyk
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/ikev2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index 55d1e96eade..08b84b25125 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.116 2014/11/07 14:12:57 mikeb Exp $ */ +/* $OpenBSD: ikev2.c,v 1.117 2014/12/05 13:40:44 mikeb Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1122,7 +1122,7 @@ ikev2_policy2id(struct iked_static_id *polid, struct iked_id *id, int srcid) struct in6_addr in6; X509_NAME *name = NULL; u_int8_t *p; - size_t len; + int len; /* Fixup the local Id if not specified */ if (srcid && polid->id_type == 0) { |