[WRTjs][Service] Add protection for DbusSetAppcontrolData parameter check 30/325130/2
authorChunling Ye <chunling.ye@samsung.com>
Wed, 4 Jun 2025 03:28:39 +0000 (11:28 +0800)
committerBot Blink <blinkbot@samsung.com>
Mon, 9 Jun 2025 04:40:24 +0000 (04:40 +0000)
Fix DF250530-00953 abnormal crash issue, add protection for patameter:
argument.

Change-Id: Id37ba7ad95e40f7cd488ec0ff5440dab9301729b
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
wrt/src/service/wrt_service_manager.cc

index c60112ecd229e5bcc21befed6d5729371add5545..f2ced1c93a842db9298a4e69d80bc35bbac61ee2 100644 (file)
@@ -106,7 +106,7 @@ void DbusSetAppcontrolData(const char*,
   if (service_manager->IsQuitting())
     return;
 
-  if (!argument) {
+  if (!argument || !strlen(argument)) {
     LOG(ERROR) << "There is no argument of SetAppcontrolData";
     return;
   }