diff --git a/PlayTools/PlayLoader.m b/PlayTools/PlayLoader.m index 1e1c6cce..ef2a15ba 100644 --- a/PlayTools/PlayLoader.m +++ b/PlayTools/PlayLoader.m @@ -90,6 +90,7 @@ static int my_sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void * int ret = sysctlbyname(name, oldp, oldlenp, newp, newlen); const char *mechine = DEVICE_MODEL; strncpy((char *)oldp, mechine, strlen(mechine)); + *oldlenp = strlen(mechine); return ret; } else { int ret = sysctlbyname(name, oldp, oldlenp, newp, newlen); @@ -100,6 +101,7 @@ static int my_sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void * int ret = sysctlbyname(name, oldp, oldlenp, newp, newlen); const char *mechine = OEM_ID; strncpy((char *)oldp, mechine, strlen(mechine)); + *oldlenp = strlen(mechine); return ret; } else { int ret = sysctlbyname(name, oldp, oldlenp, newp, newlen);