]> Cypherpunks repositories - gostls13.git/commit
syscall: allow empty string argument to SetsockoptString
authorTobias Klauser <tklauser@distanz.ch>
Fri, 5 Apr 2019 15:10:40 +0000 (17:10 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Fri, 5 Apr 2019 15:42:17 +0000 (15:42 +0000)
commitdb0c524211d82af1f632b78c80d22d734c8b1be2
tree5c83965ba8d13c895f3bd2caa4bc5081390ab0c6
parentcea44714fb4e79b939e5b781ee61e97b3d7e1c14
syscall: allow empty string argument to SetsockoptString

Don't panic with "index out of range" on empty string argument.

Fixes golang/go#31277

Change-Id: I005f9523caec76337cb2ec87272a6be4736bce18
Reviewed-on: https://go-review.googlesource.com/c/go/+/170937
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/syscall_unix.go
src/syscall/syscall_unix_test.go