8210866: Improve JPEG processing
Reviewed-by: serb, psadhukhan, rhalade
This commit is contained in:
parent
f8e1bfc6c1
commit
8d5c5cb94a
@ -406,6 +406,9 @@ alloc_sarray (j_common_ptr cinfo, int pool_id,
|
|||||||
JDIMENSION rowsperchunk, currow, i;
|
JDIMENSION rowsperchunk, currow, i;
|
||||||
long ltemp;
|
long ltemp;
|
||||||
|
|
||||||
|
if (samplesperrow == 0) {
|
||||||
|
ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
|
||||||
|
}
|
||||||
/* Calculate max # of rows allowed in one allocation chunk */
|
/* Calculate max # of rows allowed in one allocation chunk */
|
||||||
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
||||||
((long) samplesperrow * SIZEOF(JSAMPLE));
|
((long) samplesperrow * SIZEOF(JSAMPLE));
|
||||||
@ -454,6 +457,10 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
|
|||||||
JDIMENSION rowsperchunk, currow, i;
|
JDIMENSION rowsperchunk, currow, i;
|
||||||
long ltemp;
|
long ltemp;
|
||||||
|
|
||||||
|
if (blocksperrow == 0) {
|
||||||
|
ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
|
||||||
|
}
|
||||||
|
|
||||||
/* Calculate max # of rows allowed in one allocation chunk */
|
/* Calculate max # of rows allowed in one allocation chunk */
|
||||||
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) /
|
||||||
((long) blocksperrow * SIZEOF(JBLOCK));
|
((long) blocksperrow * SIZEOF(JBLOCK));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user