diff options
author | Elliott Hughes <enh@google.com> | 2018-02-08 22:41:52 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-02-09 13:06:58 -0600 |
commit | 2530d54f1145a7bf6b634f630344ed42adf388e5 (patch) | |
tree | b93d3f6b30f74ec08ddc93de23f41b1e4bc63538 /toys/android/setprop.c | |
parent | 912646fc08d1b5e497f5ddb9b14e994f6b44e291 (diff) | |
download | toybox-2530d54f1145a7bf6b634f630344ed42adf388e5.tar.gz |
Fix the pidof comm and cmdline tests.
If we have a 15-byte name, we don't know whether comm actually matches
or is a truncated form of a longer name that has a common prefix.
For example, with "this-is-a-very-long-name-that-is-too-long", we shouldn't
match "this-is-a-very-" (but the old code would).
The cmdline code was also broken on Android because it used basename(3)
rather than getbasename. This doesn't affect glibc because there's a
workaround in portability.h to ensure that we get the non-POSIX basename(3)
with glibc but then a non-glibc section that ensures everyone else gets
POSIX basename(3). That should probably be removed (and maybe `basename`
poisoned) to prevent similar mistakes in future.
Bug: http://b/73123244
Diffstat (limited to 'toys/android/setprop.c')
0 files changed, 0 insertions, 0 deletions