diff options
author | Nick Kralevich <nnk@google.com> | 2015-06-18 17:46:54 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2015-06-18 20:11:06 -0700 |
commit | d2104df69b464721a17c21b4cd27931dc3bca612 (patch) | |
tree | 832e8d1910ee35aec02ea8bf0019090be82447b3 /libutils/ProcessCallStack.cpp | |
parent | 53d504f00dea232601e1290c8255274afb0f4256 (diff) |
init/util.cpp: don't return a negative unsigned value
android_name_to_id() returns -1U on error, which causes a
crash when the following clang options are enabled:
-fsanitize=signed-integer-overflow,unsigned-integer-overflow
-ftrap-function=abort
-fsanitize-undefined-trap-on-error
Rather than returning a negative unsigned value (which doesn't
make a lot of sense, IMHO), return a positive unsigned value.
While we're here, add logging on decode_uid failures.
Bug: 21880301
Change-Id: I652e4c1daa07c7494cceca2b4e1656b9158f2604
Diffstat (limited to 'libutils/ProcessCallStack.cpp')
0 files changed, 0 insertions, 0 deletions