From ee561a8b4323bcd8f839950fa0b9074f6323fb85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B5=9C=EC=A2=85=ED=97=8C/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 26 Sep 2022 16:28:49 +0900 Subject: [PATCH] Fixed the segmentation fault in dotnettool (#437) Change-Id: I9fff49ed5d130483f46ebeed4603ef076619f885 --- NativeLauncher/tool/dotnettool.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NativeLauncher/tool/dotnettool.cc b/NativeLauncher/tool/dotnettool.cc index 24d5e48..4343b49 100644 --- a/NativeLauncher/tool/dotnettool.cc +++ b/NativeLauncher/tool/dotnettool.cc @@ -188,6 +188,12 @@ int main(int argc, char* argv[]) } } + if (args.size() == 0) { + _SERR("The command is missing"); + DisplayUsage(); + return -1; + } + if (opt->flags & NI_FLAGS_INPUT_BUBBLE_REF && !(opt->flags & NI_FLAGS_INPUT_BUBBLE)) { _SERR("--inputbubbleref option should be used with --inputbubble option"); DisplayUsage(); -- 2.7.4