From eacee60c83685c9e6796b96b22f51625f8012530 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Thu, 28 Jul 2022 23:27:42 +0200 Subject: Update c/common to an unreleased version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... to get https://github.com/containers/common/pull/1106 . Signed-off-by: Miloslav Trmač --- vendor/github.com/containernetworking/cni/pkg/invoke/exec.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vendor/github.com/containernetworking') diff --git a/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go b/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go index 55ed392a0..3ad07aa8f 100644 --- a/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go +++ b/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go @@ -50,6 +50,12 @@ func fixupResultVersion(netconf, result []byte) (string, []byte, error) { return "", nil, fmt.Errorf("failed to unmarshal raw result: %w", err) } + // plugin output of "null" is successfully unmarshalled, but results in a nil + // map which causes a panic when the confVersion is assigned below. + if rawResult == nil { + rawResult = make(map[string]interface{}) + } + // Manually decode Result version; we need to know whether its cniVersion // is empty, while built-in decoders (correctly) substitute 0.1.0 for an // empty version per the CNI spec. -- cgit v1.2.3-54-g00ecf