Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb31f939 authored by T.J. Mercier's avatar T.J. Mercier Committed by Gerrit Code Review
Browse files

Merge "Fix system_server SIGABRT due to non-UTF-8 process name in /proc/PID/stat" into main

parents 1e0dbfcb 2828cdc7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@

#include <algorithm>
#include <array>
#include <cctype>
#include <cstring>
#include <limits>
#include <memory>
@@ -1004,6 +1005,8 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
                }
            }
            if ((mode&PROC_OUT_STRING) != 0 && di < NS) {
                std::replace_if(buffer+start, buffer+end,
                                [](unsigned char c){ return !std::isprint(c); }, '?');
                jstring str = env->NewStringUTF(buffer+start);
                env->SetObjectArrayElement(outStrings, di, str);
            }