From 796ab7052c83131c53922e915554202cc51f77e3 Mon Sep 17 00:00:00 2001 From: anupamme Date: Fri, 31 Jul 2026 04:36:21 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by OrbisAI Security --- src/plugins/terminal/src/android/ProcessUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/terminal/src/android/ProcessUtils.java b/src/plugins/terminal/src/android/ProcessUtils.java index 428f3624a..003084f81 100644 --- a/src/plugins/terminal/src/android/ProcessUtils.java +++ b/src/plugins/terminal/src/android/ProcessUtils.java @@ -42,7 +42,7 @@ public static void killProcessTree(Process process) { try { long pid = getPid(process); if (pid > 0) { - Runtime.getRuntime().exec("kill -9 -" + pid); + Runtime.getRuntime().exec(new String[]{"kill", "-9", "-" + pid}); } } catch (Exception error) { Log.w("ProcessUtils", "Failed to kill process tree.", error); @@ -54,7 +54,7 @@ public static void killProcessTree(Process process) { * Forcefully kills a single process */ public static void killProcess(int pid) throws IOException, InterruptedException { - int exitCode = Runtime.getRuntime().exec("kill -9 " + pid).waitFor(); + int exitCode = Runtime.getRuntime().exec(new String[]{"kill", "-9", String.valueOf(pid)}).waitFor(); if (exitCode != 0) { throw new IOException("kill -9 " + pid + " exited with code " + exitCode); }