SIGN IN SIGN UP

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>
T
Tobias Klauser committed
68a4a8e945b22751c1a619261b1d755372a1d5f7
Parent: 690c91f
Committed by Gopher Robot <gobot@golang.org> on 4/10/2026, 9:58:23 AM