Something like this:

--- suprocess.cpp       2025-08-01 11:34:13.000000000 +0100
+++ suprocess.cpp       2025-11-12 21:03:17.287630999 +0000
@@ -231,2 +231,3 @@
     unsigned j;
+    unsigned k;

@@ -256,4 +257,13 @@
             const uint len = line.length();
+            k = 0;
+            if (line[0] == '[') {
+                do {
+                    ++k;
+                } while (k < len && line[k] != ']');
+            }
+            if (k == len ) {
+                k = 0;
+            }
             // Match "Password: " with the regex ^[^:]+:[\w]*$.
-            for (i = 0, j = 0, colon = 0; i < len; ++i) {
+            for (i = k , j = 0, colon = 0; i < len; ++i) {
                 if (line[i] == ':') {

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2130805

Title:
  kdesu hangs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/2130805/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to