Skip to content

Commit

Permalink
Annotate return_overflow issue in xlat_print() (CID #1604615)
Browse files Browse the repository at this point in the history
  • Loading branch information
jejones3141 committed Aug 27, 2024
1 parent 2510b8e commit fd42599
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/unlang/xlat_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,10 @@ ssize_t xlat_print(fr_sbuff_t *out, xlat_exp_head_t const *head, fr_sbuff_escape

xlat_exp_foreach(head, node) {
slen = xlat_print_node(out, head, node, e_rules, 0);
if (slen < 0) return slen - (fr_sbuff_used_total(out) - at_in);
if (slen < 0) {
/* coverity[return_overflow] */
return slen - (fr_sbuff_used_total(out) - at_in);
}
}

return fr_sbuff_used_total(out) - at_in;
Expand Down

0 comments on commit fd42599

Please sign in to comment.