]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
zero is a valid number of bytes to copy
authorAlan T. DeKok <aland@freeradius.org>
Wed, 18 Feb 2026 01:39:19 +0000 (20:39 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 18 Feb 2026 01:39:19 +0000 (20:39 -0500)
src/lib/tls/bio.c

index 5a5b200243ea5b2e305b6264bf16f523980b1d89..cc04df3c300596bb841943cd4f3f4bb46796ed3f 100644 (file)
@@ -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;
        }