OpenSceneGraph icon indicating copy to clipboard operation
OpenSceneGraph copied to clipboard

JP2 plugin crash on invalid file

Open mikedig opened this issue 5 years ago • 0 comments

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.

mikedig avatar Aug 04 '20 00:08 mikedig