TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
  TfLiteTensor* output;
  TF_LITE_ENSURE_OK(context,
                    GetOutputSafe(context, node, kOutputTensor, &output));
  const TfLiteTensor* input;
  TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
  const TfLiteTensor* diag;
  TF_LITE_ENSURE_OK(context,
                    GetInputSafe(context, node, kDiagonalTensor, &diag));
  FillDiagHelper(input, diag, output);
  return kTfLiteOk;
}
The software reads data past the end, or before the beginning, of the intended buffer.