]> Cypherpunks repositories - gostls13.git/commit
text/template: use reflect.Value.FieldByIndexErr
authorRob Pike <r@golang.org>
Sun, 24 Oct 2021 04:44:15 +0000 (15:44 +1100)
committerRob Pike <r@golang.org>
Fri, 29 Oct 2021 02:12:05 +0000 (02:12 +0000)
commitd3d8852d8997a6429cbd498138908e537869a6ef
tree1cd0b6b533de0c6ccf5aad44eb2c56ebfe2373d9
parent33c392f72d16163eb0795b3d61b2196ac21e1799
text/template: use reflect.Value.FieldByIndexErr

to avoid a crash on a nil pointer as an embedded field.

Fixes #48215

Change-Id: I214faa6e3cf08cdec1c01035e4bbca0900c6a408
Reviewed-on: https://go-review.googlesource.com/c/go/+/357963
Trust: Rob Pike <r@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/text/template/exec.go
src/text/template/exec_test.go