go/src/encoding
Joe Tsai f02cdba163 encoding/hex: fix Decode output check regression
CL 461958 fixed a potential panic,
but also introduced an observable regression where
invalid input could be detected before the panic occurs.
Adjust the check to preserve prior behavior,
while also preventing the panic.

Change-Id: I52819f88a6a64883fbc9fd512697c38c29ca0ccd
Reviewed-on: https://go-review.googlesource.com/c/go/+/465855
Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-02-07 15:37:55 +00:00
..
ascii85 encoding: use strings.Builder 2022-09-06 15:46:20 +00:00
asn1 all: remove redundant type conversion 2022-10-06 04:37:00 +00:00
base32 all: remove redundant type conversion 2022-10-06 04:37:00 +00:00
base64 encoding: use strings.Builder 2022-09-06 15:46:20 +00:00
binary encoding/binary: add String and GoString method to nativeEndian 2023-01-30 18:51:09 +00:00
csv encoding/csv: use proper doc comment for Deprecated notes 2022-12-02 16:30:23 +00:00
gob all: fix problematic comments 2023-01-30 18:10:36 +00:00
hex encoding/hex: fix Decode output check regression 2023-02-07 15:37:55 +00:00
json all: add missing periods in comments 2022-11-18 17:59:44 +00:00
pem all: use strings.Builder where appropriate 2022-09-29 22:56:00 +00:00
xml encoding/xml: allow overriding by empty namespace 2023-01-31 18:23:50 +00:00
encoding.go