this repo has no description
1
fork

Configure Feed

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

Fix stack corruption in getsockopt

The option was inspected without considering the protocol level.
This could lead to a false assumption
of the size of the passed in buffer.

Fixes #303

+2 -1
+2 -1
src/kernel/emulation/linux/network/getsockopt.c
··· 57 57 58 58 int sockopt_bsd_to_linux(int* level, int* optname, void** optval, void* optbuf) 59 59 { 60 - if (*optname == LOCAL_PEERCRED) 60 + /* TCP_NODELAY and LOCAL_PEERCRED both have values of 1 */ 61 + if (*optname == LOCAL_PEERCRED && *level == IPPROTO_IP) 61 62 { 62 63 struct xucred* c = (struct xucred*) optbuf; 63 64 // Simulate euid 0