Add null check to solve svace issue (#362)
author조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Thu, 6 Jan 2022 07:37:59 +0000 (16:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 6 Jan 2022 07:37:59 +0000 (16:37 +0900)
Managed/Tizen.Runtime/Preloader.cs

index 8dd07b4..8c8f30b 100644 (file)
@@ -47,6 +47,11 @@ namespace Tizen.Runtime
             foreach (string path in paths)
             {
                 string fileName = Path.GetFileName(path);
+
+                // GetFileName() can return NULL
+                if (fileName == null)
+                    continue;
+
                 // ex) Tizen.preload / 0A.Tizen.preload / A0.Tizen.preload / .0.Tizen.preload / .00.Tizen.preload
                 if (!char.IsNumber(fileName, 0) || !char.IsNumber(fileName, 1))
                     continue;