Skip to content

Commit

Permalink
Merge pull request #424 from AlexSutila/issue-415
Browse files Browse the repository at this point in the history
Addresses issue #415
  • Loading branch information
dtschump authored Jul 3, 2024
2 parents 40d7904 + 53c020f commit 93004f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/jpeg_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ static CImg get_load_jpeg_buffer(const JOCTET *const buffer, const unsigned buff
jpeg_start_decompress(&cinfo);

const unsigned int row_stride = cinfo.output_width * cinfo.output_components;
JOCTET *buf = new JOCTET[cinfo.output_width*cinfo.output_height*cinfo.output_components];
const size_t siz = safe_size(cinfo.output_width,cinfo.output_height,1,cinfo.output_components);
JOCTET *buf = new JOCTET[siz];
const JOCTET *buf2 = buf;
JSAMPROW row_pointer[1];
while (cinfo.output_scanline < cinfo.output_height) {
Expand Down

0 comments on commit 93004f1

Please sign in to comment.