OpenSceneGraph
OpenSceneGraph copied to clipboard
JP2 plugin crash on invalid file
If you call readImage with a JP2 file that exists on disk, but is an invalid JP2 file, a crash occurs here https://github.com/openscenegraph/OpenSceneGraph/blame/master/src/osgPlugins/jp2/ReaderWriterJP2.cpp#L239. I noticed the readImage call that reads from a stream has a null check (https://github.com/openscenegraph/OpenSceneGraph/blame/master/src/osgPlugins/jp2/ReaderWriterJP2.cpp#L304) before continuing on, and I was thinking the file version should also contain this check.