1 Star 0 Fork 45

小松鼠/tensorflow

forked from src-openEuler/tensorflow 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-37680.patch 952 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 718721986aa137691ee23f03638867151f74935f Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Fri, 16 Jul 2021 06:49:45 -0700
Subject: [PATCH] Prevent division by 0 in `fully_connected.cc`
PiperOrigin-RevId: 385137282
Change-Id: If201e69b6e0048f0be001330b4b977e2b46db2cb
---
tensorflow/lite/kernels/fully_connected.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/tensorflow/lite/kernels/fully_connected.cc b/tensorflow/lite/kernels/fully_connected.cc
index 4ebaa7877fa38..d0010e302618d 100644
--- a/tensorflow/lite/kernels/fully_connected.cc
+++ b/tensorflow/lite/kernels/fully_connected.cc
@@ -223,6 +223,7 @@ TfLiteStatus PrepareImpl(TfLiteContext* context, TfLiteNode* node) {
}
TF_LITE_ENSURE_EQ(context, NumDimensions(filter), 2);
+ TF_LITE_ENSURE(context, filter->dims->data[1] != 0);
const int batch_size = input_size / filter->dims->data[1];
const int num_units = filter->dims->data[0];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_songsong/tensorflow.git
git@gitee.com:wang_songsong/tensorflow.git
wang_songsong
tensorflow
tensorflow
master

搜索帮助