mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
More issues found by static analysis
This commit is contained in:
@@ -265,7 +265,7 @@ bool BmpDecoder::readData( Mat& img )
|
||||
for(;;)
|
||||
{
|
||||
int code = m_strm.getWord();
|
||||
int len = code & 255;
|
||||
const int len = code & 255;
|
||||
code >>= 8;
|
||||
if( len != 0 ) // encoded mode
|
||||
{
|
||||
@@ -304,16 +304,13 @@ bool BmpDecoder::readData( Mat& img )
|
||||
else
|
||||
{
|
||||
int x_shift3 = (int)(line_end - data);
|
||||
int y_shift = m_height - y;
|
||||
|
||||
if( code == 2 )
|
||||
{
|
||||
x_shift3 = m_strm.getByte()*nch;
|
||||
y_shift = m_strm.getByte();
|
||||
m_strm.getByte();
|
||||
}
|
||||
|
||||
len = x_shift3 + ((y_shift * width3) & ((code == 0) - 1));
|
||||
|
||||
if( color )
|
||||
data = FillUniColor( data, line_end, step, width3,
|
||||
y, m_height, x_shift3,
|
||||
|
||||
Reference in New Issue
Block a user