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
The attached patch addresses this crash, which happens with specific ill-formed jpegs.
diff --git a/vips.go b/vips.go index 36118e1..14cd90a 100644 --- a/vips.go +++ b/vips.go @@ -311,6 +311,10 @@ func Resize(buf []byte, o Options) ([]byte, error) { C.vips_colourspace_0(image, &tmpImage, C.VIPS_INTERPRETATION_sRGB) C.g_object_unref(C.gpointer(image)) image = tmpImage + if image == nil { + debug("colourspace conversion failed") + return nil, resizeError() + } // Finally save length := C.size_t(0)
The text was updated successfully, but these errors were encountered:
Thank you! I'll apply the patch asap.
Sorry, something went wrong.
I think it would probably be safer to test the exit status of vips_colourspace(). It will return 0 for success, -1 for failure.
Thanks @jcupitt
Will this be patched? I seem to have hit the same problem.
No branches or pull requests
The attached patch addresses this crash, which happens with specific ill-formed jpegs.
The text was updated successfully, but these errors were encountered: