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

Skip to content
Commit 2828cdc7 authored by T.J. Mercier's avatar T.J. Mercier
Browse files

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

It is possible for process names to include non-printable characters.
When that is the case, the second column (comm) of /proc/PID/stat output
includes '�' characters which are fed directly into NewStringUTF.
NewStringUTF detects the non-UTF-8 characters and aborts. Fix this by
replacing all non-printable characters with question marks '?' before
calling NewStringUTF.

Bug: 351917521
Bug: 361017804
Test: adb wait-for-device shell 'echo -ne "\x9C\x88foo" > /proc/$$/comm; sleep 9999'
Change-Id: I040c8640e441c4545747edb5870a746892d1b09c
parent f3507faa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment