• Rebecca Stambler's avatar
    strconv: check for empty string in UnquoteChar · b219a68a
    Rebecca Stambler authored
    The existing implementation panics on malformed input of an empty
    string. strconv.Unquote validates the length of the inputs, but calling
    UnquoteChar directly with an empty string leads to a panic, so add a
    check for length. Also, add a test to go/constant to ensure that
    MakeFromLiteral does not panic on malformed input such as
    "const x = ''".
    
    Change-Id: I4217e38db48a09a21ec414bbfb3087709da62904
    Reviewed-on: https://go-review.googlesource.com/116215
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    b219a68a
Name
Last commit
Last update
.github Loading commit data...
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...