sz must be longer than target string

This commit is contained in:
Halo-Michael committed 2020-12-03 21:05:00 +08:00
1 parent dff1af4bb5
commit cbcfbca895
1 file changed
+1 -1
+1 -1
View File
@@ -251,7 +251,7 @@ void CPUInfo::Detect()
isVFP4 = true;
#endif
#endif // PPSSPP_PLATFORM(IOS)
size_t sz;
size_t sz = 0x41; // char brand_string[0x41]
if (sysctlbyname("machdep.cpu.brand_string", brand_string, &sz, nullptr, 0) != 0) {
strcpy(brand_string, "Unknown");
}