The calls in question are those in pair_list_init() that iterate
over a pair list built up from a string. As long as the string
is non-empty, the pair list won't be empty. As long as perc (the
percentage) is no larger than 100, the code won't pass NULL to
fr_pair_copy()... and one can see that's the case for all calls
to pair_list_init(). Coverity apparently doesn't look at that
context.
* to use for duplicating attributes to required percentage.
* Duplicates are at the beginning of the source list
*/
+ /* coverity[null_returns] */
vp = fr_pair_list_head(&list);
for (j = 0; j < (size_t)(input_count * perc / 100); j++) {
+ /* coverity[null_returns] */
new_vp = fr_pair_copy(ctx, vp);
fr_pair_append(&dups, new_vp);
+ /* coverity[null_returns] */
vp = fr_pair_list_next(&list, vp);
}
}