From ed928a91a80db4f013995a558433012b1dfc03ea Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Sun, 25 Jun 2023 15:29:08 +0100 Subject: Fixing fault in ExeNet when a model file does not include an extension. If you pass a file name without an extension as the -m parameter to execute network it won't be able to determine the parser to use. This results in a segmentation fault. Signed-off-by: Colm Donelan Change-Id: I91821a5abd50b65b8d60409aa9a807013e0b0e6a --- tests/ExecuteNetwork/ArmNNExecutor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index ac857a90df..6955a492b3 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -612,7 +612,10 @@ std::unique_ptr ArmNNExecutor::CreateParser() LogAndThrow("Not built with Onnx parser support."); #endif } - + if (parser == nullptr) + { + throw InvalidArgumentException("Unable to determine the model type based on the file name extension."); + } return parser; } -- cgit v1.2.1