Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8beta2 windows/amd64
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\GoLib_beta
set GORACE=
set GOROOT=C:\Go_beta
set GOTOOLDIR=C:\Go_beta\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Bob\AppData\Local\Temp\go-build889712907=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
What did you do?
I've been playing with the archive/zip code recently, and spotted some suspicious code. You might want to have a quick look to see if I am right, or crazy.
In file reader.go around line 300, there is a labelled loop named Extras. The loop is for processing the ZIP extra fields in a DirectoryHeader. There are a lot of "break Extras" statements in that loop that seem like they might prevent all of the extra fields from being processed. For example, after a "zip64ExtraId" field is processed, it breaks out of the loop, preventing a possibly following "exttsExtraId" field from being processed.
Am I interpreting that correctly? If not, very sorry for wasting your time!!
But if I read it correctly, it's a subtle bug that easily could be missed in testing.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version)?go version go1.8beta2 windows/amd64
What operating system and processor architecture are you using (
go env)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\GoLib_beta
set GORACE=
set GOROOT=C:\Go_beta
set GOTOOLDIR=C:\Go_beta\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Bob\AppData\Local\Temp\go-build889712907=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
What did you do?
I've been playing with the archive/zip code recently, and spotted some suspicious code. You might want to have a quick look to see if I am right, or crazy.
In file reader.go around line 300, there is a labelled loop named Extras. The loop is for processing the ZIP extra fields in a DirectoryHeader. There are a lot of "break Extras" statements in that loop that seem like they might prevent all of the extra fields from being processed. For example, after a "zip64ExtraId" field is processed, it breaks out of the loop, preventing a possibly following "exttsExtraId" field from being processed.
Am I interpreting that correctly? If not, very sorry for wasting your time!!
But if I read it correctly, it's a subtle bug that easily could be missed in testing.