opencv/opencv-CVE-2017-1000450.patch

14 lines
603 B
Diff
Raw Permalink Normal View History

2018-04-10 10:54:17 +00:00
diff -urNp old/modules/imgcodecs/src/grfmt_bmp.cpp new/modules/imgcodecs/src/grfmt_bmp.cpp
--- old/modules/imgcodecs/src/grfmt_bmp.cpp 2018-04-10 12:43:48.636921073 +0200
+++ new/modules/imgcodecs/src/grfmt_bmp.cpp 2018-04-10 12:49:30.394233343 +0200
@@ -368,6 +368,9 @@ decode_rle4_bad: ;
gray_palette[code] );
line_end_flag = y - prev_y;
+
+ if( y >= m_height )
+ break;
}
else if( code > 2 ) // absolute mode
{