projects
/
platform
/
core
/
dotnet
/
launcher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5717a3c
)
Fix coverity issue
accepted/tizen/unified/20250310.131221
accepted/tizen/unified/x/20250311.125551
author
Woongsuk
<ws77.cho@samsung.com>
Mon, 10 Mar 2025 00:24:47 +0000
(09:24 +0900)
committer
조웅석/MDE Lab(SR)/삼성전자
<ws77.cho@samsung.com>
Mon, 10 Mar 2025 00:31:26 +0000
(09:31 +0900)
add null check before creating string
NativeLauncher/launcher/exec/corerun.cc
patch
|
blob
|
history
diff --git
a/NativeLauncher/launcher/exec/corerun.cc
b/NativeLauncher/launcher/exec/corerun.cc
index 887912bd4d4aa0be7c91b8354bcb17fea58d8c84..9b7f1d7fc52c390b6ad563959769000b52b098bc 100644
(file)
--- a/
NativeLauncher/launcher/exec/corerun.cc
+++ b/
NativeLauncher/launcher/exec/corerun.cc
@@
-136,9
+136,11
@@
int main(int argc, const char* argv[]) {
}
// Implicit compatibility mode for System.CommandLine.
- std::string termValue(getenv("TERM"));
- if (termValue == "linux") {
- setenv("TERM", "xterm", 1);
+ char* termValue = getenv("TERM");
+ if (termValue) {
+ if (strcmp(termValue, "linux") == 0) {
+ setenv("TERM", "xterm", 1);
+ }
}
argc--;