this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix #926

Essentially just replicate what we already have in `sys_sysctlbyname`

+4 -1
+4 -1
src/kernel/emulation/linux/misc/sysctl_unspec.c
··· 14 14 extern char* strcat(char* dst, const char* src); 15 15 extern __SIZE_TYPE__ strlen(const char* str); 16 16 extern int strcmp(const char* str1, const char* str2); 17 + extern int strlcpy(char* dst, const char* src, __SIZE_TYPE__ n); 17 18 18 19 static sysctl_handler(handle_oid_to_name); 19 20 static sysctl_handler(handle_name_to_oid); ··· 72 73 int oid_len = 0; 73 74 char* saveptr; 74 75 const char* token; 76 + char _new_copy[128]; // the actual max for this is MAXPATHLEN 75 77 76 - token = strtok_r((char*) _new, ".", &saveptr); 78 + strlcpy(_new_copy, _new, sizeof(_new_copy)); 79 + token = strtok_r((char*) _new_copy, ".", &saveptr); 77 80 78 81 while (token != NULL) 79 82 {