In OpenCV 3.3.1, an assertion failure happens in cv::RBaseStream::setPos in modules/imgcodecs/src/bitstrm.cpp because of an incorrect integer cast. A crafted file could cause the application to crash.
Upstream issue:
https://github.com/opencv/opencv/issues/10540