1 Star 0 Fork 51

gice/tensorflow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-37672.patch 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
From a4e138660270e7599793fa438cd7b2fc2ce215a6 Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Thu, 29 Jul 2021 22:24:27 -0700
Subject: [PATCH] Add remaining validation to `sdca_internal.cc`
PiperOrigin-RevId: 387738010
Change-Id: I28eedcfd87a53aaf34deb075acea1f8c95470808
---
tensorflow/core/kernels/sdca_internal.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tensorflow/core/kernels/sdca_internal.cc b/tensorflow/core/kernels/sdca_internal.cc
index 6c4a63b270c25..164f9382724ca 100644
--- a/tensorflow/core/kernels/sdca_internal.cc
+++ b/tensorflow/core/kernels/sdca_internal.cc
@@ -380,6 +380,11 @@ Status Examples::Initialize(OpKernelContext* const context,
const Tensor* example_labels_t;
TF_RETURN_IF_ERROR(context->input("example_labels", &example_labels_t));
auto example_labels = example_labels_t->flat<float>();
+ if (example_labels.size() != num_examples) {
+ return errors::InvalidArgument("Expected ", num_examples,
+ " example labels but got ",
+ example_labels.size());
+ }
OpInputList dense_features_inputs;
TF_RETURN_IF_ERROR(
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gice/tensorflow.git
git@gitee.com:gice/tensorflow.git
gice
tensorflow
tensorflow
master

搜索帮助