Null-terminate libselinux seinfo in fuzzer. am: f68a36b119
Original change: https://android-review.googlesource.com/c/platform/external/selinux/+/1509588 Change-Id: Ia0f2a8eb38659558c711bb28acba3c9da1aa753c
This commit is contained in:
commit
0281142093
1 changed files with 2 additions and 2 deletions
|
@ -26,9 +26,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
uid_t uid = fdp.ConsumeIntegral<int>();
|
||||
bool isSystemServer = fdp.ConsumeBool();
|
||||
std::string pkgname = fdp.ConsumeRandomLengthString();
|
||||
std::vector<char> seinfo = fdp.ConsumeRemainingBytes<char>();
|
||||
std::string seinfo = fdp.ConsumeRemainingBytesAsString();
|
||||
|
||||
selinux_android_setcontext(uid, isSystemServer, seinfo.data(), pkgname.c_str());
|
||||
selinux_android_setcontext(uid, isSystemServer, seinfo.c_str(), pkgname.c_str());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue