зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1710897 - Handle matrix inversion failing more gracefully. r=aosmond
Prior to making invert() return an Option we just gleefully assumed that it succeeded here. Instead of panicing let's fail to create the transform. The problem was found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34216 Differential Revision: https://phabricator.services.mozilla.com/D114999
This commit is contained in:
Родитель
7891d34a05
Коммит
54a52e060a
|
@ -873,7 +873,7 @@ fn modular_transform_create_output(out: &Profile) -> Option<Vec<Box<dyn ModularT
|
|||
(&out.redTRC, &out.greenTRC, &out.blueTRC)
|
||||
{
|
||||
let mut transform = Box::new(MatrixTransform::default());
|
||||
transform.matrix = build_colorant_matrix(out).invert().unwrap();
|
||||
transform.matrix = build_colorant_matrix(out).invert()?;
|
||||
transforms.push(transform);
|
||||
|
||||
let mut transform = Box::new(MatrixTransform::default());
|
||||
|
|
Загрузка…
Ссылка в новой задаче