]> Cypherpunks repositories - gostls13.git/commit
text/template: detect pathologically recursive template invocations
authorAndrew Gerrand <adg@golang.org>
Thu, 12 May 2016 20:55:46 +0000 (13:55 -0700)
committerAndrew Gerrand <adg@golang.org>
Thu, 12 May 2016 22:32:30 +0000 (22:32 +0000)
commiteb69476c66339ca494f98e65a78d315da99a9c79
tree900cb75a8839cff859de0844d86c2401dc87051d
parent8f48efb31c7cdddeec7d4221174254466b0891dd
text/template: detect pathologically recursive template invocations

Return an error message instead of eating memory and eventually
triggering a stack overflow.

Fixes #15618

Change-Id: I3dcf1d669104690a17847a20fbfeb6d7e39e8751
Reviewed-on: https://go-review.googlesource.com/23091
Reviewed-by: Rob Pike <r@golang.org>
src/text/template/exec.go
src/text/template/exec_test.go