]> Cypherpunks repositories - gostls13.git/commit
syscall: check if to is nil to prevent panic from WSASendto
authorcuiweixie <cuiweixie@gmail.com>
Mon, 26 Sep 2022 14:49:08 +0000 (22:49 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 26 Sep 2022 20:42:40 +0000 (20:42 +0000)
commit52f9c6fdb0e5748406134e093e9fb791af14d300
treefe6db079c6ac332c8a7a0d77f3f02aadfb7d75fe
parent4da2bc2eebb480f1c2a726de05f4e085e97d3b6c
syscall: check if to is nil to prevent panic from WSASendto

to is an optional pointer to sockaddr, as written in the doc:
https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasendto

For #55845

Change-Id: Ia685cec8d9bc9ff313f598db9d2213a1f409757a
Reviewed-on: https://go-review.googlesource.com/c/go/+/434535
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/syscall/syscall_windows.go