aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-03-13 16:46:16 -0400
committerNick Mathewson <nickm@torproject.org>2020-03-13 16:46:16 -0400
commitb2e543bfe74bb5855a86429c61c0efc91d660719 (patch)
tree85a0de04369f0b1cbf22808fd6f2f2e72657935b /src/lib/tls
parentc96cf1494357af5a2fd0309ef3d26aba52105edb (diff)
parentb9d71f3848a2858dc0a3c5232c85d97525aacd25 (diff)
downloadtor-b2e543bfe74bb5855a86429c61c0efc91d660719.tar.gz
tor-b2e543bfe74bb5855a86429c61c0efc91d660719.zip
Merge branch 'maint-0.3.5' into maint-0.4.1
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/buffers_tls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/tls/buffers_tls.c b/src/lib/tls/buffers_tls.c
index bf03b61459..ed0f821ce8 100644
--- a/src/lib/tls/buffers_tls.c
+++ b/src/lib/tls/buffers_tls.c
@@ -146,10 +146,10 @@ buf_flush_to_tls(buf_t *buf, tor_tls_t *tls, size_t flushlen,
size_t flushed = 0;
ssize_t sz;
tor_assert(buf_flushlen);
- if (BUG(*buf_flushlen > buf->datalen)) {
+ IF_BUG_ONCE(*buf_flushlen > buf->datalen) {
*buf_flushlen = buf->datalen;
}
- if (BUG(flushlen > *buf_flushlen)) {
+ IF_BUG_ONCE(flushlen > *buf_flushlen) {
flushlen = *buf_flushlen;
}
sz = (ssize_t) flushlen;