summaryrefslogtreecommitdiff
path: root/user/cairo/CVE-2019-6462.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-27 23:41:01 +0000
committerZach van Rijn <me@zv.io>2021-07-27 23:41:01 +0000
commitdbf2ee8a4c30d9326a182f421fbc2e5b58f9fc6d (patch)
treef0b5cb765c7f5a5ad19dd7db8303e1816ba9ebdf /user/cairo/CVE-2019-6462.patch
parentcb89ebf6d88ee2ce9c87fbfc27d75fa65b3baa48 (diff)
parenteff1c3c87532b591492fec9e3952425e199547a9 (diff)
downloadpackages-dbf2ee8a4c30d9326a182f421fbc2e5b58f9fc6d.tar.gz
packages-dbf2ee8a4c30d9326a182f421fbc2e5b58f9fc6d.tar.bz2
packages-dbf2ee8a4c30d9326a182f421fbc2e5b58f9fc6d.tar.xz
packages-dbf2ee8a4c30d9326a182f421fbc2e5b58f9fc6d.zip
Merge branch 'aerdan/20210721' into 'master'
Bump packages owned by Síle See merge request adelie/packages!619
Diffstat (limited to 'user/cairo/CVE-2019-6462.patch')
-rw-r--r--user/cairo/CVE-2019-6462.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/cairo/CVE-2019-6462.patch b/user/cairo/CVE-2019-6462.patch
new file mode 100644
index 000000000..2a26876c3
--- /dev/null
+++ b/user/cairo/CVE-2019-6462.patch
@@ -0,0 +1,36 @@
+From bbeaf08190d3006a80b80a77724801cd477a37b8 Mon Sep 17 00:00:00 2001
+From: Heiko Lewin <hlewin@worldiety.de>
+Date: Sat, 17 Apr 2021 19:15:03 +0200
+Subject: [PATCH] _arc_max_angle_for_tolerance_normalized: fix infinite loop
+
+---
+ src/cairo-arc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/cairo-arc.c b/src/cairo-arc.c
+index 390397bae..1c891d1a0 100644
+--- a/src/cairo-arc.c
++++ b/src/cairo-arc.c
+@@ -90,16 +90,18 @@ _arc_max_angle_for_tolerance_normalized (double tolerance)
+ { M_PI / 11.0, 9.81410988043554039085e-09 },
+ };
+ int table_size = ARRAY_LENGTH (table);
++ const int max_segments = 1000; /* this value is chosen arbitrarily. this gives an error of about 1.74909e-20 */
+
+ for (i = 0; i < table_size; i++)
+ if (table[i].error < tolerance)
+ return table[i].angle;
+
+ ++i;
++
+ do {
+ angle = M_PI / i++;
+ error = _arc_error_normalized (angle);
+- } while (error > tolerance);
++ } while (error > tolerance && i < max_segments);
+
+ return angle;
+ }
+--
+GitLab
+