mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-11 06:32:19 +00:00
Prevent undefined behavior in magiskboot
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
bool check_env(const char *name) {
|
||||
const char *val = getenv(name);
|
||||
return val ? val == "true"sv : false;
|
||||
return val != nullptr && val == "true"sv;
|
||||
}
|
||||
|
||||
void magisk_cpio::patch() {
|
||||
|
||||
Reference in New Issue
Block a user