2

ERROR I GET: Assertion failed: (angle_max >= angle_min), function _cairo_arc_in_direction, file cairo-arc.c, line 189.

With some svg icons my code works fine, but some of them cause issue (error above)

const svgContent = fs.readFileSync(`/path/to/svg`, 'utf8');
canvg(canvas, svgContent);
  • If those SVG files work everywhere else (eg in browsers), then report this bug to the Cairo folks. Include the `` that is causing the problem. In the meantime you may be able to tweak your SVGs so that they work. But we can't help you that because we can't debug files we can't see. – Paul LeBeau Apr 13 '19 at 08:22
  • https://gitlab.freedesktop.org/cairo/cairo/issues/352 – Uli Schlachter Apr 13 '19 at 17:16

1 Answers1

0

This is CVE-2019-6462 in Cairo. If you're able to build Cairo from source, there's a patch available here: https://github.com/clearlinux-pkgs/cairo/blob/master/CVE-2019-6462.patch.

ZachB
  • 13,051
  • 4
  • 61
  • 89