]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use same code as previous check
authorAlan T. DeKok <aland@freeradius.org>
Fri, 6 Mar 2026 01:14:58 +0000 (20:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 6 Mar 2026 01:48:04 +0000 (20:48 -0500)
this should really be abstracted into a common function

src/lib/tls/bio.c

index cc04df3c300596bb841943cd4f3f4bb46796ed3f..5b51eed1726e45e4874e9df0ddf8e3f7807278b6 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;
        }