# HG changeset patch # User Carnë Draug # Date 1387388841 0 # Node ID bc1809fe55e483255e5b503af69200675dcf8e8c # Parent f4b7edf75f043a99c385068dd7dd9dd2cf8437e4 Do not reduce Magick::ErrorCoder to warning, issue an error like other errors. * __magick_read__.cc (read_file): the Magick::ErrorCoder is issued by the different coders and is being caught as a warning without any apparent reason. A simple warning when no image was actually read leads to a segfault when accessing the elements of imvec, which currently happens in F__magick_finfo__ An alternative would be to check the size of imvec, but really, an error here should cause an error. GraphicsMagick documentation says that warnings are for `suspected but completed' while errors are for `failed', so if anything is issuing an error but still read the image and we should continue, then it needs to be fixed upstream to throw a Magick::WarningCoder instead. diff -r f4b7edf75f04 -r bc1809fe55e4 libinterp/dldfcn/__magick_read__.cc --- a/libinterp/dldfcn/__magick_read__.cc Tue Dec 17 23:57:59 2013 +0100 +++ b/libinterp/dldfcn/__magick_read__.cc Wed Dec 18 17:47:21 2013 +0000 @@ -652,13 +652,6 @@ { warning ("Magick++ warning: %s", w.what ()); } - catch (Magick::ErrorCoder& e) - { - // XXX: why is this error being caught as a warning? It has always - // been like this (function was added the first time to the - // Octave Forge image package with cset d756a7b6d533) - warning ("Magick++ coder error: %s", e.what ()); - } catch (Magick::Exception& e) { error ("Magick++ exception: %s", e.what ());