unlang_frame_state_limit_t *state = talloc_get_type_abort(frame->state, unlang_frame_state_limit_t);
fr_value_box_t *box = fr_value_box_list_head(&state->result);
+ if (unlikely(!box)) RETURN_UNLANG_FAIL;
/*
* compile_limit() ensures that the tmpl is cast to uint32, so we don't have to do any more work here.
*/
filter = fr_value_box_list_head(&group_ctx->expanded_filter);
- if (filter->type != FR_TYPE_STRING) RETURN_UNLANG_FAIL;
+ if (!filter || filter->type != FR_TYPE_STRING) RETURN_UNLANG_FAIL;
group_ctx->attrs[0] = inst->group.obj_name_attr;
return fr_ldap_trunk_search(group_ctx, &group_ctx->query, request, group_ctx->ttrunk,