rasky / go-lzo Goto Github PK
View Code? Open in Web Editor NEWNative LZO implementation in Go
License: GNU General Public License v2.0
Native LZO implementation in Go
License: GNU General Public License v2.0
Hello,
I just ran go-fuzz on the decompressor and it found this possibly triggering an infinite loop:
https://github.com/pmezard/go-lzo/blob/fuzz-it/crashers/5ba93c9db0cff93f52b521d7420e43f6eda2784f
with the fuzzer here:
https://github.com/pmezard/go-lzo/blob/fuzz-it/fuzz.go
(I committed the corpus/ to the branch as well if you are interested).
I do not know if you implemented it just as an experiment or if you care about such reports.
It does not decompress packets, getting lookbehind underrun but I am using java anarres.lzo and I decompress the data
Hi,
I am using go language. And i want to compress files which are retrieved by ls command. I want to use rasky/go-lzo package. please guide me how can i do this?
Can this project be dual licensed? perhaps in Apache 2.0 or MIT such that Apache 2.0 projects can link against this library?
Current LICENSE.gpl is too restrictive and incompatible with Apache 2.0 released projects.
Hi Giovanni,
I have a Python application that compresses data using python-lzo and then decompresses when needed in another part of application.
I'm currently porting decompressing part of the application to golang and for some reason when I'm trying to use your library it always throws LookBehindUnderrun
error at me. Here is the code I'm using:
import (
"bytes"
"fmt"
"github.com/rasky/go-lzo"
)
outData, err = lzo.Decompress1X(bytes.NewReader(inData), 0, 0)
if err != nil {
fmt.Println(err)
}
Any ideas ?
Thanks in advance.
like gzip's or snappy's see: https://github.com/golang/snappy/blob/master/decode.go#L138
Upcoming Go 1.13 change https://golang.org/cl/161477 updates the runtime error strings for index out of range errors, which breaks the assumption that Decompress1X func has on it at https://github.com/rasky/go-lzo/blob/master/decompress.go#L160.
$ go version
$ go version devel +431b5c69ca Tue Apr 16 21:54:01 2019 +0000 darwin/amd64
$ go test
--- FAIL: TestDecompInlen (0.00s)
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
goroutine 20 [running]:
testing.tRunner.func1(0xc0000e8100)
/Users/herbie/work/go113/go/src/testing/testing.go:830 +0x3a3
panic(0x115b440, 0xc00010a020)
/Users/herbie/work/go113/go/src/runtime/panic.go:619 +0x1b2
github.com/rasky/go-lzo.Decompress1X.func1(0xc000106e70)
/Users/herbie/work/google3-go/lzo/decompress.go:165 +0xfa
panic(0x115b440, 0xc00010a020)
/Users/herbie/work/go113/go/src/runtime/panic.go:619 +0x1b2
github.com/rasky/go-lzo.(*reader).ReadU16(...)
/Users/herbie/work/google3-go/lzo/decompress.go:94
github.com/rasky/go-lzo.Decompress1X(0x1199c40, 0xc0000c2040, 0x31, 0x0, 0xc0000d6090, 0xf, 0x10, 0x0, 0x0)
/Users/herbie/work/google3-go/lzo/decompress.go:234 +0x944
github.com/rasky/go-lzo.TestDecompInlen(0xc0000e8100)
/Users/herbie/work/google3-go/lzo/compress_test.go:126 +0x20c
testing.tRunner(0xc0000e8100, 0x1177800)
/Users/herbie/work/go113/go/src/testing/testing.go:865 +0xbf
created by testing.(*T).Run
/Users/herbie/work/go113/go/src/testing/testing.go:916 +0x350
exit status 2
FAIL github.com/rasky/go-lzo 0.024s
I'll send a PR to update the check.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.