1 Star 0 Fork 45

小松鼠/tensorflow

forked from src-openEuler/tensorflow 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-29562.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
From 1c56f53be0b722ca657cbc7df461ed676c8642a2 Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Tue, 4 May 2021 17:11:46 -0700
Subject: [PATCH] Fix a check fail in Fast Fourier implementation
PiperOrigin-RevId: 372026629
Change-Id: Id05c3362aa575271bc3e06b16316c9037085fc11
---
tensorflow/core/kernels/fft_ops.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tensorflow/core/kernels/fft_ops.cc b/tensorflow/core/kernels/fft_ops.cc
index c3235c1547ff0..29ca0d2f546a0 100644
--- a/tensorflow/core/kernels/fft_ops.cc
+++ b/tensorflow/core/kernels/fft_ops.cc
@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
+#include "tensorflow/core/platform/errors.h"
#define EIGEN_USE_THREADS
// See docs in ../ops/fft_ops.cc.
@@ -261,6 +262,9 @@ class FFTCPU : public FFTBase {
i == FFTRank ? fft_shape[i - 1] / 2 + 1 : fft_shape[i - 1];
full_fft_shape.AddDim(fft_shape[i - 1]);
}
+ OP_REQUIRES(ctx, full_fft_shape.num_elements() > 0,
+ errors::InvalidArgument("Obtained a FFT shape of 0 elements: ",
+ full_fft_shape.DebugString()));
Tensor temp;
OP_REQUIRES_OK(ctx, ctx->allocate_temp(DataTypeToEnum<ComplexT>::v(),
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_songsong/tensorflow.git
git@gitee.com:wang_songsong/tensorflow.git
wang_songsong
tensorflow
tensorflow
master

搜索帮助