You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
fix: ReZygiskd out-of-bounds write due to too small system_arch buffer
This commit fixes the issue where when the "ro.product.cpu.abilist" prop has a value bigger than 31 characters, which mostly happens in WSA (Windows Subsystem For Android) as it can support 5+ architectures, it will write outside the buffer, leading to undefined behavior, but most of the time crashes.
This commit is contained in:
@@ -48,7 +48,7 @@ enum Architecture {
|
||||
#define ZYGISKD_PATH "/data/adb/modules/rezygisk/bin/zygiskd" lp_select("32", "64")
|
||||
|
||||
static enum Architecture get_arch(void) {
|
||||
char system_arch[32];
|
||||
char system_arch[64];
|
||||
get_property("ro.product.cpu.abilist", system_arch);
|
||||
|
||||
if (strstr(system_arch, "arm") != NULL) return lp_select(ARM32, ARM64);
|
||||
|
||||
Reference in New Issue
Block a user