From 831c2e7a7b03ae5e07efa6de1cc947e503b61126 Mon Sep 17 00:00:00 2001 From: John Howard Date: Tue, 13 Oct 2015 14:01:36 -0700 Subject: [PATCH] Windows: Fix AV in build due to userns Signed-off-by: John Howard --- archive/diff.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archive/diff.go b/archive/diff.go index f5f0d80..e365f84 100644 --- a/archive/diff.go +++ b/archive/diff.go @@ -25,6 +25,13 @@ func UnpackLayer(dest string, layer Reader, options *TarOptions) (size int64, er defer pools.BufioReader32KPool.Put(trBuf) var dirs []*tar.Header + + if options == nil { + options = &TarOptions{} + } + if options.ExcludePatterns == nil { + options.ExcludePatterns = []string{} + } remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps) if err != nil { return 0, err