]> Cypherpunks repositories - gostls13.git/commit
encoding/asn1: return error for unexported fields in Marshal, Unmarshal
authorHiroshi Ioka <hirochachacha@gmail.com>
Fri, 21 Oct 2016 00:00:07 +0000 (09:00 +0900)
committerRuss Cox <rsc@golang.org>
Thu, 3 Nov 2016 03:44:05 +0000 (03:44 +0000)
commit154d013155978ba9c714d931f0e91c9c964dd82c
tree6dc67cee16ce3dcf175626c91809c5435da500e5
parentbe7c50a7101a6e3cbd39648814c9f1030980c0f6
encoding/asn1: return error for unexported fields in Marshal, Unmarshal

The old code cannot handle unexported fields, it panics.
The new code returns error instead.

Fixes #17462

Change-Id: I927fc46b21d60e86cb52e84c65f2122f9159b21d
Reviewed-on: https://go-review.googlesource.com/31540
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/encoding/asn1/asn1.go
src/encoding/asn1/asn1_test.go
src/encoding/asn1/marshal.go