Merge pull request #499 from lionsoul2014/fix_golang_searcher

Fix golang searcher
This commit is contained in:
Leon / 狮子的魂 2026-08-01 08:53:04 +08:00 committed by GitHub
commit 2955431edb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 {
return nil, err
}
defer handle.Close()
// 1, verify the xdb
err = xdb.Verify(handle)

View File

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