diff options
author | miod <> | 2014-05-31 19:09:20 +0000 |
---|---|---|
committer | miod <> | 2014-05-31 19:09:20 +0000 |
commit | abc09e7ca58bc425caf1f38342e5f0453cfcbc43 (patch) | |
tree | 4898b549eee30018e5970ddd3ceee3cca166f99d /src/lib/libssl/d1_both.c | |
parent | a5757b535e4efefee62f47029a4e4e9cb16e6d32 (diff) | |
download | openbsd-abc09e7ca58bc425caf1f38342e5f0453cfcbc43.tar.gz openbsd-abc09e7ca58bc425caf1f38342e5f0453cfcbc43.tar.bz2 openbsd-abc09e7ca58bc425caf1f38342e5f0453cfcbc43.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 'src/lib/libssl/d1_both.c')
-rw-r--r-- | src/lib/libssl/d1_both.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index d62362e69a..8e2843625b 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
@@ -946,7 +946,7 @@ dtls1_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x) | |||
946 | unsigned char *p; | 946 | unsigned char *p; |
947 | 947 | ||
948 | n = i2d_X509(x, NULL); | 948 | n = i2d_X509(x, NULL); |
949 | if (!BUF_MEM_grow_clean(buf, (int)(n + (*l) + 3))) { | 949 | if (!BUF_MEM_grow_clean(buf, n + (*l) + 3)) { |
950 | SSLerr(SSL_F_DTLS1_ADD_CERT_TO_BUF, ERR_R_BUF_LIB); | 950 | SSLerr(SSL_F_DTLS1_ADD_CERT_TO_BUF, ERR_R_BUF_LIB); |
951 | return 0; | 951 | return 0; |
952 | } | 952 | } |