-
Notifications
You must be signed in to change notification settings - Fork 24
Empty File processing issue #87
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
for 7-zip archive data, version 0.4, below code would work
types.go 697 ~710
case idEmptyFile:
empty, err := readBool(r, emptyStreams)
if err != nil {
return nil, err
}
j := 0
for i := range f.file {
if f.file[i].isEmptyStream {
f.file[i].isEmptyFile = empty[j]
}
j++
}But for 7-zip archive data, version 0.3, empty slice may be index out of range.
I found that in version 0.3, the empty file does not appear only in front of the f.file, which causes the index of empty to be taken later on to exceed.
Should j++ write in isEmptyStream condition , like below ?
case idEmptyFile:
empty, err := readBool(r, emptyStreams)
if err != nil {
return nil, err
}
j := 0
for i := range f.file {
if f.file[i].isEmptyStream {
f.file[i].isEmptyFile = empty[j]
j++
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working