]> Cypherpunks.ru repositories - gostls13.git/commit
syscall: don't panic when argv is nil on freebsd
authorRoland Shoemaker <roland@golang.org>
Fri, 2 Jun 2023 15:49:47 +0000 (08:49 -0700)
committerRoland Shoemaker <roland@golang.org>
Mon, 5 Jun 2023 15:22:32 +0000 (15:22 +0000)
commit96b79bd3208078835d6a1b9b8c7050554eccc734
tree30c156fca5a9883c9e7ae60d488e6edadb53539b
parent05293d6b499afe9f37c11582c4a9a41fd92ba258
syscall: don't panic when argv is nil on freebsd

The workaround in CL 69970044 introduced a panic when StartProcess is
called with empty argv. Check the length before trying to access it.

Change-Id: Ic948d86c7067a21c484ba24e100d1f1f80179730
Reviewed-on: https://go-review.googlesource.com/c/go/+/500415
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/syscall/exec_unix.go
src/syscall/exec_unix_test.go