1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:28:32 -06:00
go/internal/fastwalk
Yuval Pavel Zholkover 5e66757b83 internal/fastwalk: don't cross Dirent.Reclen boundry while looking for NULL in parseDirEnt
Crossing Dirent.Reclen boundry was manifested in golang/go#28131 as garbaled filenames,
when Dirent.Name was not NULL terminated on FreeBSD due to a bug (parseDirEnt would find a NULL
in the following Dirent's Fileno/Reclen fields).

Only search for NULL on linux, when the Namlen field is available use it directly instead.

Updates golang/go#28131

Change-Id: I64090576c8bad2bd246d1561432bf73d5caee2a9
Reviewed-on: https://go-review.googlesource.com/c/141801
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-13 18:20:35 +00:00
..
fastwalk_dirent_fileno.go imports: extract fastWalk into new package internal/fastwalk 2018-04-16 19:53:52 +00:00
fastwalk_dirent_ino.go imports: extract fastWalk into new package internal/fastwalk 2018-04-16 19:53:52 +00:00
fastwalk_dirent_namlen_bsd.go internal/fastwalk: don't cross Dirent.Reclen boundry while looking for NULL in parseDirEnt 2018-10-13 18:20:35 +00:00
fastwalk_dirent_namlen_linux.go internal/fastwalk: don't cross Dirent.Reclen boundry while looking for NULL in parseDirEnt 2018-10-13 18:20:35 +00:00
fastwalk_portable.go internal/gopathwalk: create 2018-10-12 18:13:39 +00:00
fastwalk_test.go internal/gopathwalk: create 2018-10-12 18:13:39 +00:00
fastwalk_unix.go internal/fastwalk: don't cross Dirent.Reclen boundry while looking for NULL in parseDirEnt 2018-10-13 18:20:35 +00:00
fastwalk.go internal/gopathwalk: create 2018-10-12 18:13:39 +00:00