From: James Jones Date: Wed, 3 Aug 2022 13:44:14 +0000 (-0500) Subject: Annotate false positive in fr_dbuff_init() (CIDs listed below) (#4643) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69d4cc1a2f0bbcb58ef43d1acb772e39235a42bd;p=thirdparty%2Ffreeradius-server.git Annotate false positive in fr_dbuff_init() (CIDs listed below) (#4643) The end pointer is set to point just past the space given to it. This is legal in C, and is only compared with, not dereferenced. CIDs affected: 1503895, 1503905, 1503907, 1503914, 1503915, 1503924, 1503956, 1503970, 1503973, 1503979, 1503980, 1503988, 1504000, 1504034, 1504035, 1504039, 1504040, 1504046, 1504059 --- diff --git a/src/lib/util/dbuff.h b/src/lib/util/dbuff.h index bae50093e63..967f7a2b44d 100644 --- a/src/lib/util/dbuff.h +++ b/src/lib/util/dbuff.h @@ -348,6 +348,7 @@ static inline CC_HINT(nonnull) void _fr_dbuff_init(fr_dbuff_t *out, uint8_t cons * of the buffer we're deconding. */ #define fr_dbuff_init(_out, _start, _len_or_end) \ +/* coverity[overrun-local] */ \ _fr_dbuff_init(_out, \ (uint8_t const *)(_start), \ _Generic((_len_or_end), \