Skip to content

Give schemes a dangling address for empty slices, fixing UB in userspace

Jacob Lorentzon requested to merge 4lDO2/kernel:fix-utf8-userspace-ub into master

This allows schemes to avoid checking the length against zero before constructing a slice from pointer+len that the kernel gave. Additionally, the address is now non-canonical on x86, meaning that userspace will fail instead of continuing with UB, if they would ever forget to check the length.

Merge request reports