aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzongwave <wei.zong@intel.com>2019-03-28 04:06:51 +0800
committerZong Wei <wei.zong@intel.com>2019-03-28 18:10:52 +0800
commiteab35b74c71e933ab6390fa63e5fe26d6d96c705 (patch)
treefee351de95bef5b84a4273fd828a0ddf0c1dc986
parent32412f75a79bf5b57926172c99c9492bd6f7a019 (diff)
downloadlibxcam-eab35b74c71e933ab6390fa63e5fe26d6d96c705.tar.gz
robust: fix potential unvalidated integer value use
-rw-r--r--tests/test-dnn-inference.cpp1
-rw-r--r--tests/test-render-surround-view.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/test-dnn-inference.cpp b/tests/test-dnn-inference.cpp
index a16e6d8..e3b7baf 100644
--- a/tests/test-dnn-inference.cpp
+++ b/tests/test-dnn-inference.cpp
@@ -292,6 +292,7 @@ int main (int argc, char *argv[])
break;
case 'l':
+ XCAM_ASSERT (optarg);
loop = atoi (optarg);
break;
case 'h':
diff --git a/tests/test-render-surround-view.cpp b/tests/test-render-surround-view.cpp
index be9d071..9142d4d 100644
--- a/tests/test-render-surround-view.cpp
+++ b/tests/test-render-surround-view.cpp
@@ -488,15 +488,19 @@ int main (int argc, char *argv[])
PUSH_STREAM (SVStream, ins, optarg);
break;
case 'w':
+ XCAM_ASSERT (optarg);
input_width = (uint32_t)atoi(optarg);
break;
case 'h':
+ XCAM_ASSERT (optarg);
input_height = (uint32_t)atoi(optarg);
break;
case 'W':
+ XCAM_ASSERT (optarg);
output_width = (uint32_t)atoi(optarg);
break;
case 'H':
+ XCAM_ASSERT (optarg);
output_height = (uint32_t)atoi(optarg);
break;
case 'S':