From 070c0b6b45d0d7f2d2c04c8571907ece001e3470 Mon Sep 17 00:00:00 2001 From: KimMachineGun Date: Mon, 8 Feb 2021 01:03:57 +0900 Subject: [PATCH 1/2] doc/go1.16: mention new vet check for asn1.Unmarshal --- doc/go1.16.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/go1.16.html b/doc/go1.16.html index 878bf0d0293954..6af4127d76181c 100644 --- a/doc/go1.16.html +++ b/doc/go1.16.html @@ -378,6 +378,26 @@

New warning for frame pointer

fixes.

+

New warning for asn1.Unmarshal

+ +

+ The vet tool now warns about invalid calls of + asn1.Unmarshal. + If you pass non-pointer or nil argument to + asn1.Unmarshal, + the vet tool will report it. +

+ +

+ The vet tool already has been checking invalid Unmarshal and + Decode calls of other encoding packages such as + encoding/json, + encoding/xml. + This release makes the vet tool check + encoding/asn1's one + as well. +

+

Runtime

From e47c38f6309f31a6de48d4ffc82078d7ad45b171 Mon Sep 17 00:00:00 2001 From: KimMachineGun Date: Mon, 8 Feb 2021 02:02:16 +0900 Subject: [PATCH 2/2] doc/go1.16: revamp vet check for asn1.Unamrshal section --- doc/go1.16.html | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/doc/go1.16.html b/doc/go1.16.html index 6af4127d76181c..f6f72c3882cb5c 100644 --- a/doc/go1.16.html +++ b/doc/go1.16.html @@ -381,21 +381,11 @@

New warning for frame pointer

New warning for asn1.Unmarshal

- The vet tool now warns about invalid calls of + The vet tool now warns about incorrectly passing a non-pointer or nil argument to asn1.Unmarshal. - If you pass non-pointer or nil argument to - asn1.Unmarshal, - the vet tool will report it. -

- -

- The vet tool already has been checking invalid Unmarshal and - Decode calls of other encoding packages such as - encoding/json, - encoding/xml. - This release makes the vet tool check - encoding/asn1's one - as well. + This is like the existing checks for + encoding/json.Unmarshal + and encoding/xml.Unmarshal.

Runtime