• Didier Spezia's avatar
    text/template: fix variadic function call corner case · 5c60a4fb
    Didier Spezia authored
    Executing a template involving variadic functions featuring
    a []interface{} slice (such as printf) could result in a
    panic in reflect.Value.Call, due to incorrect type checking.
    
    The following expressions failed (with a panic):
    {{true|printf}}
    {{1|printf}}
    {{1.1|printf}}
    {{'x'|printf}}
    {{1+2i|printf}}
    
    Implemented proper type checks for the fixed parameters of the
    variadic functions.
    
    Fixes #10946
    
    Change-Id: Ia75333f651f73b3d2e024cb0c47cc30d90cb6852
    Reviewed-on: https://go-review.googlesource.com/10403Reviewed-by: 's avatarRob Pike <r@golang.org>
    5c60a4fb
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...