@@ -11,6 +11,11 @@ automatically place the `.rodata` section in an executable segment, which
|
|||||||
prevented libjpeg-turbo from working properly with other linkers and also
|
prevented libjpeg-turbo from working properly with other linkers and also
|
||||||
represented a potential security risk.
|
represented a potential security risk.
|
||||||
|
|
||||||
|
2. Fixed an issue whereby the `tjTransform()` function incorrectly computed the
|
||||||
|
MCU block size for 4:4:4 JPEG images with non-unary sampling factors and thus
|
||||||
|
unduly rejected some cropping regions, even though those regions aligned with
|
||||||
|
8x8 MCU block boundaries.
|
||||||
|
|
||||||
|
|
||||||
2.1.1
|
2.1.1
|
||||||
=====
|
=====
|
||||||
|
|||||||
@@ -1966,12 +1966,12 @@ DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf,
|
|||||||
THROW("tjTransform(): Transform is not perfect");
|
THROW("tjTransform(): Transform is not perfect");
|
||||||
|
|
||||||
if (xinfo[i].crop) {
|
if (xinfo[i].crop) {
|
||||||
if ((t[i].r.x % xinfo[i].iMCU_sample_width) != 0 ||
|
if ((t[i].r.x % tjMCUWidth[jpegSubsamp]) != 0 ||
|
||||||
(t[i].r.y % xinfo[i].iMCU_sample_height) != 0) {
|
(t[i].r.y % tjMCUHeight[jpegSubsamp]) != 0) {
|
||||||
snprintf(this->errStr, JMSG_LENGTH_MAX,
|
snprintf(this->errStr, JMSG_LENGTH_MAX,
|
||||||
"To crop this JPEG image, x must be a multiple of %d\n"
|
"To crop this JPEG image, x must be a multiple of %d\n"
|
||||||
"and y must be a multiple of %d.\n",
|
"and y must be a multiple of %d.\n",
|
||||||
xinfo[i].iMCU_sample_width, xinfo[i].iMCU_sample_height);
|
tjMCUWidth[jpegSubsamp], tjMCUHeight[jpegSubsamp]);
|
||||||
this->isInstanceError = TRUE;
|
this->isInstanceError = TRUE;
|
||||||
retval = -1; goto bailout;
|
retval = -1; goto bailout;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user