]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotated two false positive dereferences (CIDS #1506638, #1506635) (#4741)
authorJames Jones <jejones3141@gmail.com>
Mon, 26 Sep 2022 23:33:12 +0000 (18:33 -0500)
committerGitHub <noreply@github.com>
Mon, 26 Sep 2022 23:33:12 +0000 (19:33 -0400)
Two overlooked cases in which the caller knows that the dlist
entries in fact exist.

src/lib/unlang/xlat_builtin.c

index 3aace4f66d6c3d4a5ab68a84c8e2b9a2b9bdc9ce..e6aa4f423a0f52cfb7c607f04910471090ed070e 100644 (file)
@@ -1858,6 +1858,7 @@ static xlat_action_t xlat_func_lpad(UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out,
        fr_value_box_t          *values = fr_dlist_head(args);
        fr_value_box_list_t     *list = &values->vb_group;
        fr_value_box_t          *pad = fr_dlist_next(args, values);
+       /* coverity[dereference] */
        size_t                  pad_len = (size_t)pad->vb_uint64;
        /* coverity[dereference] */
        fr_value_box_t          *fill = fr_dlist_next(args, pad);
@@ -2374,8 +2375,10 @@ static xlat_action_t xlat_hmac(TALLOC_CTX *ctx, fr_dcursor_t *out,
        key = fr_dlist_next(in, data);
 
        if (type == HMAC_MD5) {
+               /* coverity[dereference] */
                fr_hmac_md5(digest, data->vb_octets, data->vb_length, key->vb_octets, key->vb_length);
        } else if (type == HMAC_SHA1) {
+               /* coverity[dereference] */
                fr_hmac_sha1(digest, data->vb_octets, data->vb_length, key->vb_octets, key->vb_length);
        }