From: Nick Porter Date: Fri, 14 Jul 2023 09:46:26 +0000 (+0100) Subject: Pacify Coverity (CID #1506302) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30a25168bb1f64be38bf57ad833a0867ddaa7519;p=thirdparty%2Ffreeradius-server.git Pacify Coverity (CID #1506302) --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 0e972cda769..30465057289 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -616,13 +616,13 @@ static xlat_action_t xlat_func_integer(TALLOC_CTX *ctx, fr_dcursor_t *out, } if (in_vb->vb_length > sizeof(uint32_t)) { - fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT64, NULL); + if (unlikely(fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT64, NULL) < 0)) goto error; } else if (in_vb->vb_length > sizeof(uint16_t)) { - fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT32, NULL); + if (unlikely(fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT32, NULL) < 0)) goto error; } else if (in_vb->vb_length > sizeof(uint8_t)) { - fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT16, NULL); + if (unlikely(fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT16, NULL) < 0)) goto error; } else { - fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT8, NULL); + if (unlikely(fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT8, NULL) < 0)) goto error; } break;