diff options
Diffstat (limited to 'src/lib/tls/buffers_tls.c')
-rw-r--r-- | src/lib/tls/buffers_tls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/tls/buffers_tls.c b/src/lib/tls/buffers_tls.c index 79a908e2cc..87055744a7 100644 --- a/src/lib/tls/buffers_tls.c +++ b/src/lib/tls/buffers_tls.c @@ -69,9 +69,9 @@ buf_read_from_tls(buf_t *buf, tor_tls_t *tls, size_t at_most) check_no_tls_errors(); IF_BUG_ONCE(buf->datalen >= INT_MAX) - return -1; + return TOR_TLS_ERROR_MISC; IF_BUG_ONCE(buf->datalen >= INT_MAX - at_most) - return -1; + return TOR_TLS_ERROR_MISC; while (at_most > total_read) { size_t readlen = at_most - total_read; |