Skip to content

Commit 0202e52

Browse files
blendinalalek
authored andcommitted
Fix out of bounds write
1 parent 7997e7a commit 0202e52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/highgui/src/grfmt_bmp.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ decode_rle4_bad: ;
367367
gray_palette[code] );
368368

369369
line_end_flag = y - prev_y;
370+
371+
if( y >= m_height )
372+
break;
370373
}
371374
else if( code > 2 ) // absolute mode
372375
{

0 commit comments

Comments
 (0)