0xrawsec / golang-evtx

GNU General Public License v3.0
157 stars 26 forks source link

panic: runtime error: index out of range #2

Closed crazy-max closed 6 years ago

crazy-max commented 6 years ago

Hi,

First time i have this issue while loading a sysmon.evtx file :

for e := range ef.FastEvents() {
    if !e.IsEventID("3") {
        continue
    }
}
panic: runtime error: index out of range
goroutine 25 [running]:
github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-utils/datastructs.NewSortedSlice(0xc04231dd40, 0x2, 0x2, 0xc000000008, 0xc0421f8080, 0x0)
    X:/dev/neard/www/go/src/github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-utils/datastructs/sortedslice.go:27 +0x9b
github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx.(*File).Chunks(0xc042156360, 0x8619c0)
    X:/dev/neard/www/go/src/github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx/evtx.go:169 +0x96
github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx.(*File).FastEvents.func1.1(0xc0421a7380, 0xc042156360)
    X:/dev/neard/www/go/src/github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx/evtx.go:309 +0x77
created by github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx.(*File).FastEvents.func1
    X:/dev/neard/www/go/src/github.com/crazy-max/WindowsSpyBlocker/vendor/github.com/0xrawsec/golang-evtx/evtx/evtx.go:307 +0xa4
crazy-max commented 6 years ago

Oh nervermind, solved with your latest commit :)