Compare commits

...

3 Commits

Author SHA1 Message Date
Leon / 狮子的魂 2955431edb
Merge pull request #499 from lionsoul2014/fix_golang_searcher
Fix golang searcher
2026-08-01 08:53:04 +08:00
lionsoul2014 c0d85cc71d extend the check for the runtime ptr size 2026-08-01 08:51:32 +08:00
lionsoul2014 d5e3616d8e close the handle 2026-08-01 08:50:56 +08:00
2 changed files with 2 additions and 1 deletions

View File

@ -70,6 +70,7 @@ func newConfig(cachePolicy int, ipVersion *xdb.Version, xdbPath string, searcher
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer handle.Close()
// 1, verify the xdb // 1, verify the xdb
err = xdb.Verify(handle) err = xdb.Verify(handle)

View File

@ -61,7 +61,7 @@ type Header struct {
} }
func NewHeader(input []byte) (*Header, error) { func NewHeader(input []byte) (*Header, error) {
if len(input) < 16 { if len(input) < 20 {
return nil, fmt.Errorf("invalid input buffer") return nil, fmt.Errorf("invalid input buffer")
} }