Fix some more implicit size_t truncations.
The buffer length is int, so the output also fits in int.
Bug: 516
Change-Id: I8e59a2109f38c81ac58f1a8f1e7d739c8b0d1c7c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/55707
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c
index b95fb6b..c19f1c4 100644
--- a/crypto/bio/connect.c
+++ b/crypto/bio/connect.c
@@ -363,7 +363,7 @@
}
bio_clear_socket_error();
- ret = recv(bio->num, out, out_len, 0);
+ ret = (int)recv(bio->num, out, out_len, 0);
BIO_clear_retry_flags(bio);
if (ret <= 0) {
if (bio_fd_should_retry(ret)) {
@@ -387,7 +387,7 @@
}
bio_clear_socket_error();
- ret = send(bio->num, in, in_len, 0);
+ ret = (int)send(bio->num, in, in_len, 0);
BIO_clear_retry_flags(bio);
if (ret <= 0) {
if (bio_fd_should_retry(ret)) {