From: James Jones Date: Tue, 27 Jun 2023 18:13:44 +0000 (-0500) Subject: Check inidital fr_sbuff_in_bstrncpy() calls in BIO_write conversion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72ece0d459a3d02f23cc768c1d33efff62b70159;p=thirdparty%2Ffreeradius-server.git Check inidital fr_sbuff_in_bstrncpy() calls in BIO_write conversion CIDs: #1503916 (tls_log_request_bio_write_cb()) #1503889 (tls_log_global_bio_write_cb()) --- diff --git a/src/lib/tls/log.c b/src/lib/tls/log.c index 6f76eb1405c..ccf23ce67fb 100644 --- a/src/lib/tls/log.c +++ b/src/lib/tls/log.c @@ -352,8 +352,7 @@ static int tls_log_request_bio_write_cb(BIO *bio, char const *in, int len) * to aggregate it, then look for new line chars * as an indication we need to print the line. */ - /* coverity[check_return] */ - fr_sbuff_in_bstrncpy(&lb->sbuff, in, len); + if (fr_sbuff_in_bstrncpy(&lb->sbuff, in, len) < 0) return 0; /* * Split incoming data on new lines @@ -436,8 +435,7 @@ static int tls_log_global_bio_write_cb(BIO *bio, char const *in, int len) * to aggregate it, then look for new line chars * as an indication we need to print the line. */ - /* coverity[check_return] */ - fr_sbuff_in_bstrncpy(&lb->sbuff, in, len); + if (fr_sbuff_in_bstrncpy(&lb->sbuff, in, len) < 0) return 0; /* * Split incoming data on new lines