In OpenCV 3.3.1, a heap-based buffer overflow happens in cv::Jpeg2KDecoder::readComponent8u in modules/imgcodecs/src/grfmt_jpeg2000.cpp when parsing a crafted image file. This could cause the application to crash.
Upstream issue:
https://github.com/opencv/opencv/issues/10541