From: Alan T. DeKok Date: Wed, 18 Feb 2026 01:39:19 +0000 (-0500) Subject: zero is a valid number of bytes to copy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=033fd90425cfda08c5b45aba837aeba398bf761c;p=thirdparty%2Ffreeradius-server.git zero is a valid number of bytes to copy --- diff --git a/src/lib/tls/bio.c b/src/lib/tls/bio.c index 5a5b200243e..cc04df3c300 100644 --- a/src/lib/tls/bio.c +++ b/src/lib/tls/bio.c @@ -152,7 +152,7 @@ static int _tls_bio_talloc_gets_cb(BIO *bio, char *buf, int size) if (to_copy >= (size_t)size) to_copy = (size_t)size - 1; /* Space for \0 */ slen = fr_dbuff_out_memcpy((uint8_t *)buf, &bd->dbuff_out, to_copy); - if (!fr_cond_assert(slen > 0)) { /* Shouldn't happen */ + if (fr_cond_assert(slen < 0)) { /* Shouldn't happen */ buf[0] = '\0'; return (int)slen; }