summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author T.J. Mercier <tjmercier@google.com> 2024-10-25 00:36:31 +0000
committer T.J. Mercier <tjmercier@google.com> 2024-10-25 01:24:09 +0000
commit2828cdc7ca40e8c142338b36c146968076eca33e (patch)
tree354a9aa134bd863f4ae8eb8a0e95d1732e9bae68 /libs/androidfw/StringPool.cpp
parentf3507faaab23f1f8d11a3b9d9b363eb972502d94 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions