src/file_jpg.c: fix potential out of bound read access
This commit is contained in:
parent
1500416a58
commit
96ed018176
1 changed files with 2 additions and 1 deletions
|
@ -1203,7 +1203,8 @@ static void jpg_check_picture(file_recovery_t *file_recovery)
|
||||||
src->file_size_max=file_recovery->file_size;
|
src->file_size_max=file_recovery->file_size;
|
||||||
}
|
}
|
||||||
/* Image is very big, skip some tests */
|
/* Image is very big, skip some tests */
|
||||||
if(jpeg_session.output_height * jpeg_session.row_stride > 500 * 1024 * 1024)
|
if((uint64_t)jpeg_session.output_height * jpeg_session.row_stride > 500 * 1024 * 1024 ||
|
||||||
|
jpeg_session.output_height<9)
|
||||||
jpeg_session.flags=0;
|
jpeg_session.flags=0;
|
||||||
/* 0x100/2=0x80, medium value */
|
/* 0x100/2=0x80, medium value */
|
||||||
if(jpeg_session.flags==0)
|
if(jpeg_session.flags==0)
|
||||||
|
|
Loading…
Reference in a new issue