Skip to content

Commit

Permalink
Fixed a BMP decoding bug (buffer underrun)
Browse files Browse the repository at this point in the history
Fixes issue #8
  • Loading branch information
jsummers committed Apr 4, 2017
1 parent dc74009 commit 4500070
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/imagew-bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ static int iwbmp_read_info_header(struct iwbmprcontext *rctx)
// structure, and identifies the BMP version.
if(!iwbmp_read(rctx,buf,4)) goto done;
rctx->infoheader_size = iw_get_ui32le(&buf[0]);
if(rctx->infoheader_size<12) goto done;

// Read the rest of the header.
n = rctx->infoheader_size;
Expand Down

0 comments on commit 4500070

Please sign in to comment.