this repo has no description
1
fork

Configure Feed

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

Null-terminate strings returned from fcntl(F_GETPATH)

+7 -1
+7 -1
src/kernel/emulation/linux/fcntl/fcntl.c
··· 67 67 case F_GETPATH: 68 68 { 69 69 char buf[100]; 70 + int len; 70 71 71 72 sprintf(buf, "/proc/self/fd/%d", fd); 72 - return sys_readlink(buf, (char*) arg, MAXPATHLEN); 73 + len = sys_readlink(buf, (char*) arg, MAXPATHLEN); 74 + 75 + if (len >= 0) 76 + ((char*) arg)[len] = '\0'; 77 + 78 + return len; 73 79 } 74 80 // TODO: implement remaining commands 75 81 default: