drop the use of std::getenv function 01/317801/1 accepted/tizen_9.0_unified tizen_9.0 accepted/tizen/9.0/unified/20250109.164302
authorInki Dae <inki.dae@samsung.com>
Wed, 8 Jan 2025 05:53:46 +0000 (14:53 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 8 Jan 2025 05:53:46 +0000 (14:53 +0900)
Drop the use of std::getenv function. This is reported as security issue
from VD KNOA system.

Change-Id: I3d83fcea564ae51a6be5187a25e930c8fc39741b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
src/inference_engine_tflite.cpp

index caa1bd69f291481257f8c501362f03c2fbc7150d..80e36dcd3d51d3f339af530f0fe7afec7e8683bb 100644 (file)
@@ -144,12 +144,8 @@ namespace TFLiteImpl
 
                int numThreads = MV_INFERENCE_TFLITE_MAX_THREAD_NUM;
 
-               if (_number_of_threads > 0) {
+               if (_number_of_threads > 0)
                        numThreads = _number_of_threads;
-               } else {
-                       const char *envNumThreads = std::getenv("TFLITE_NUM_THREADS");
-                       numThreads = envNumThreads ? std::atoi(envNumThreads) : MV_INFERENCE_TFLITE_MAX_THREAD_NUM;
-               }
 
                LOGD("numThreads : [%d]", numThreads);