]> Cypherpunks repositories - gostls13.git/commit
syscall: correctly pad with NUL in FreeBSD convertFromDirents11
authorYuval Pavel Zholkover <paulzhol@gmail.com>
Wed, 10 Oct 2018 20:32:36 +0000 (23:32 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 12 Oct 2018 14:55:06 +0000 (14:55 +0000)
commite19f5754640b0dd6a315edffcaef23c3cf2cefe6
tree7d2787a479871ef571033f01a8c9267444886e37
parent1f95e0a9d99c8307b24e8bf542ae0e093ee95838
syscall: correctly pad with NUL in FreeBSD convertFromDirents11

We weren't writing a terminating NUL after dstDirent.Namlen bytes of dstDirent.Name.
And we weren't filling the possible additional bytes until dstDirent.Reclen.

Fixes #28131

Change-Id: Id691c25225795c0dbb0d7004bfca7bb7fc706de9
Reviewed-on: https://go-review.googlesource.com/c/141297
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/dirent_bsd_test.go [new file with mode: 0644]
src/syscall/syscall_freebsd.go