diff --git a/src/trees-ostream.c b/src/trees-ostream.c index c2b3a66..1b25a91 100644 --- a/src/trees-ostream.c +++ b/src/trees-ostream.c @@ -87,7 +87,7 @@ trees_ostream_send_chunk(struct trees_ostream *sstream, unsigned char ciphertext[ciphertext_len]; /* Extra protection here against overflow. */ - if (chunk_size < (SSIZE_MAX - crypto_box_SEALBYTES)) { + if (chunk_size >= (SSIZE_MAX - crypto_box_SEALBYTES)) { sstream->ostream.ostream.stream_errno = EIO; goto err; }