We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is code, on the TypeByBuffer call I get the panic:
err := magicmime.Open(magicmime.MAGIC_MIME_TYPE) mime, err := magicmime.TypeByBuffer(buffer) if err != nil { return err } magicmime.Close()
fatal error: unexpected signal during runtime execution Jun 05 07:36:23 : /usr/lib/golang/src/runtime/panic.go:503 +0x8e Jun 05 07:36:23 : runtime.sigpanic() Jun 05 07:36:23 : /usr/lib/golang/src/runtime/sigpanic_unix.go:14 +0x5e Jun 05 07:36:23 : goroutine 6581214 [syscall, locked to thread]: Jun 05 07:36:23 : runtime.cgocall_errno(0x401610, 0xc2080e1698, 0xc200000000) Jun 05 07:36:23 : /usr/lib/golang/src/runtime/cgocall.go:130 +0xf5 fp=0xc2080e16 Jun 05 07:36:23 : github.com/rakyll/magicmime._Cfunc_magic_buffer(0x7fece80008c0 Jun 05 07:36:23 : github.com/rakyll/magicmime/_obj/_cgo_gotypes.go:76 +0x44 fp=0 Jun 05 07:36:23 : github.com/rakyll/magicmime.TypeByBuffer(0xc2085fda00, 0x200, Jun 05 07:36:23 : /home/aa/go/src/github.com/rakyll/magicmime/magicmime.go:151
The text was updated successfully, but these errors were encountered:
it might be something as silly as the buffer is empty? I'm not sure yet what casues it but I see it every fews days in the production logs.
Sorry, something went wrong.
well just noticed in code:
if len(buffer) == 0 { return errors.New("mime type checked failed zero bytes") }
so buffer len is not zero.
No branches or pull requests
here is code, on the TypeByBuffer call I get the panic:
The text was updated successfully, but these errors were encountered: