You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mtbl.Merger interface returns corrupted values when Get() is called. In the example below, the MTBL contains keys that are domains in reverse order, with the values being a set of related DNS records. This should repro with any MTBL and seems specific to mtbl.Merger (mtbl.Reader works as expected).
We need also need to set GODEBUG=cgocheck=0 to avoid the issue in #4.
$ GODEBUG=cgocheck=0 go run get_merge.go moc.elpmaxe 20161210_dnsrecords_all-names.mtbl
Reader: "moc.elpmaxe" "[[\"aaaa\",\"2606:2800:220:1:248:1893:25c8:1946\"]]"
Merger: "moc.elpmaxe" "\x00s\xb4\x01\x00\x00\x00\x00x\x9b\b2 \u007f\x00\x00800:220:1:248:1893:25c8:1946\"]]"
This seems to apply to mtbl.Reader() as well, but happens much less frequently. The only workaround is avoiding Get() entirely and moving to Prefix() with manual filtering.
I never really finished golang-mtbl. I started working on it years ago when I first started learning Go, and I'm not really working on much Go code or projects that use mtbl these days.
Feel free to fork this repo if you'd like to improve it, or maybe ping my former colleagues @vixie@merkletrie@bapril to see if they'd like to bring it under https://github.com/farsightsec. I don't think they use golang-mtbl, though.
The mtbl.Merger interface returns corrupted values when Get() is called. In the example below, the MTBL contains keys that are domains in reverse order, with the values being a set of related DNS records. This should repro with any MTBL and seems specific to mtbl.Merger (mtbl.Reader works as expected).
We need also need to set
GODEBUG=cgocheck=0
to avoid the issue in #4.The source for
get_merge.go
The text was updated successfully, but these errors were encountered: