Update libjpeg-turbo to v2.0.5
Update Chromium's copy of libjpeg-turbo to the latest stable upstream
release (v2.0.5) and reapply our local changes documented in
README.chromium. This update addresses three CVEs - CVE-2018-19664,
CVE-2018-20330, CVE-2018-20330 - that do not affect Chromium. The
fixes do, however, satisfy UBSan - allowing Chromium's libjpeg-turbo
to be used in AOSP.
Cherry-pick one additional change[1] from upstream to prevent AArch64
Windows builds from failing.
[1] https://github.com/libjpeg-turbo/libjpeg-turbo/commit/6ee5d5f568fda1a7c6a49dd8995f2d89866ee42d
Bug: 922430
Bug: https://issuetracker.google.com/135180511
Change-Id: I146fe82f7a016ce393eb0d37aebe0b7c2492a9da
diff --git a/rdswitch.c b/rdswitch.c
index c50c33e..886fec3 100644
--- a/rdswitch.c
+++ b/rdswitch.c
@@ -338,8 +338,8 @@
#else
q_scale_factor[tblno] = jpeg_quality_scaling(val);
#endif
- while (*arg && *arg++ != ',') /* advance to next segment of arg string */
- ;
+ while (*arg && *arg++ != ','); /* advance to next segment of arg
+ string */
} else {
/* reached end of parameter, set remaining factors to last value */
#if JPEG_LIB_VERSION >= 70
@@ -378,8 +378,8 @@
return FALSE;
}
cinfo->comp_info[ci].quant_tbl_no = val;
- while (*arg && *arg++ != ',') /* advance to next segment of arg string */
- ;
+ while (*arg && *arg++ != ','); /* advance to next segment of arg
+ string */
} else {
/* reached end of parameter, set remaining components to last table */
cinfo->comp_info[ci].quant_tbl_no = val;
@@ -412,8 +412,8 @@
}
cinfo->comp_info[ci].h_samp_factor = val1;
cinfo->comp_info[ci].v_samp_factor = val2;
- while (*arg && *arg++ != ',') /* advance to next segment of arg string */
- ;
+ while (*arg && *arg++ != ','); /* advance to next segment of arg
+ string */
} else {
/* reached end of parameter, set remaining components to 1x1 sampling */
cinfo->comp_info[ci].h_samp_factor = 1;