add assert to tf graph simplifier to address security concerns

This commit is contained in:
rogday
2022-04-13 15:55:36 +03:00
parent 3a595ea5c4
commit a2b84e9897
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -1571,6 +1571,13 @@ TEST_P(Test_TensorFlow_layers, tf2_permute_nhwc_ncwh)
runTensorFlowNet("tf2_permute_nhwc_ncwh");
}
// issue #21852
TEST_P(Test_TensorFlow_layers, tf_graph_simplifier_buffer_overflow)
{
// This just shouldn't segfault, otherwise it's fine
EXPECT_ANY_THROW(readNetFromTensorflow(path("tf_graph_simplifier_buffer_overflow_net.pb")));
}
TEST_P(Test_TensorFlow_layers, squeeze)
{
#if defined(INF_ENGINE_RELEASE)