]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotate false positive in fr_dbuff_init() (CIDs listed below) (#4643)
authorJames Jones <jejones3141@gmail.com>
Wed, 3 Aug 2022 13:44:14 +0000 (08:44 -0500)
committerGitHub <noreply@github.com>
Wed, 3 Aug 2022 13:44:14 +0000 (09:44 -0400)
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:
1503895150390515039071503914150391515039241503956,
1503970150397315039791503980150398815040001504034,
15040351504039150404015040461504059

src/lib/util/dbuff.h

index bae50093e63a2c0edbd54392097971e3139c771f..967f7a2b44d75a9913c68943f09048f239c252ed 100644 (file)
@@ -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), \