Skip to content

Commit

Permalink
fix runtime error: signed integer overflow in file src/bmp.imageio/bm…
Browse files Browse the repository at this point in the history
…pinput.cpp:302

Signed-off-by: zhailiangliang <zhailiangliang@loongson.cn>
  • Loading branch information
xiaoxiaoafeifei committed Aug 18, 2023
1 parent e3f6665 commit 85bb382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bmp.imageio/bmpinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ BmpInput::read_rle_image()
int rletype = m_dib_header.compression == RLE4_COMPRESSION ? 4 : 8;
m_spec.attribute("compression", rletype == 4 ? "rle4" : "rle8");
m_uncompressed.clear();
m_uncompressed.resize(m_spec.height * m_spec.width);
m_uncompressed.resize(m_spec.image_pixels());
// Note: the clear+resize zeroes out the buffer
bool ok = true;
int y = 0, x = 0;
Expand Down

0 comments on commit 85bb382

Please sign in to comment.