syscall: validate ParseDirent inputs
Don't panic, crash, or return references to uninitialized memory when ParseDirent is passed invalid input. Move common dirent parsing to syscall.go with minimal platform-specific functions in syscall_$GOOS.go. Fixes #15653 Change-Id: I5602475e02321fe381064488401c14b33bec6886 Reviewed-on: https://go-review.googlesource.com/23780 Run-TryBot: Damien Neil <dneil@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
src/syscall/dirent.go
0 → 100644
src/syscall/endian_big.go
0 → 100644
src/syscall/endian_little.go
0 → 100644
Please register or sign in to comment