unix: avoid nil pointer dereference in Utime
Passing a nil buf *Utimbuf to Utime on linux/{arm,arm64,loong64,riscv64}
will cause a nil pointer dereference. Check buf explicitly to avoid this
case.
Change-Id: Ifb719f83029002f043919daa066af6b1fb4ebe03
Reviewed-on: https://go-review.googlesource.com/c/sys/+/764562
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
This repository holds supplemental Go packages for low-level interactions with the operating system.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/sys.
The main issue tracker for the sys repository is located at https://go.dev/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.