summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-05-31 19:09:20 +0000
committermiod <miod@openbsd.org>2014-05-31 19:09:20 +0000
commite5d2e8bebca1e220ecd7a0c0b0679e76197144bc (patch)
tree29997a83d43bfbf41566c51b83a658088ba19f6c /lib/libssl/d1_both.c
parentAdd a comment documenting where libssl depends upon the current (objectionable) (diff)
downloadwireguard-openbsd-e5d2e8bebca1e220ecd7a0c0b0679e76197144bc.tar.xz
wireguard-openbsd-e5d2e8bebca1e220ecd7a0c0b0679e76197144bc.zip
BUF_MEM_grow_clean() takes a size_t as the size argument. Remove false comments
mentioning it's an int, bogus (int) casts and bounds checks against INT_MAX (BUF_MEM_grow_clean has its own integer bounds checks). ok deraadt@
Diffstat (limited to 'lib/libssl/d1_both.c')
-rw-r--r--lib/libssl/d1_both.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index d62362e69a1..8e2843625b8 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -946,7 +946,7 @@ dtls1_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
unsigned char *p;
n = i2d_X509(x, NULL);
- if (!BUF_MEM_grow_clean(buf, (int)(n + (*l) + 3))) {
+ if (!BUF_MEM_grow_clean(buf, n + (*l) + 3)) {
SSLerr(SSL_F_DTLS1_ADD_CERT_TO_BUF, ERR_R_BUF_LIB);
return 0;
}