summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-09-19 11:15:51 -0400
committerRich Felker <dalias@aerifal.cx>2016-09-19 11:15:51 -0400
commit66570ec9c465e3c6c5d6dbd7dd42e45041a39288 (patch)
tree3c51235653f22dd24eb5ffc2afc4398348758ffa /src/network
parentc002668eb0352e619ea7064e4940b397b4a6e68d (diff)
downloadmusl-66570ec9c465e3c6c5d6dbd7dd42e45041a39288.tar.gz
fix undefined behavior in sched.h cpu_set_t usage
since cpu sets can be dynamically allocated and have variable size, accessing their contents via ->__bits is not valid; performing pointer arithmetic outside the range of the size of the declared __bits array results in undefined beahavior. instead, only use cpu_set_t for fixed-size cpu set objects (instantiated by the caller) and as an abstract pointer type for dynamically allocated ones. perform all accesses simply by casting the abstract pointer type cpuset_t * back to unsigned long *.
Diffstat (limited to 'src/network')
0 files changed, 0 insertions, 0 deletions