- Escaped backslashes are not correctly handled when producing xdot with dot #165
- heap-over-flow(off-by-null) in lib/common/shapes.c #1700
- Windows MSBuild executables have the wrong version #1745
+- Cast Overflow at pango_textlayout #1314
## [2.44.1] - 2020-06-29
}
if (!fontname || strcmp(fontname, span->font->name) != 0 || fontsize != span->font->size) {
+
+ /* check if the conversion to Pango units below will overflow */
+ if ((double)(G_MAXINT / PANGO_SCALE) < span->font->size) {
+ return FALSE;
+ }
+
fontname = span->font->name;
fontsize = span->font->size;
pango_font_description_free (desc);
assert any(r'hello \\\" world' in l for l in ldraw), \
'unexpected ldraw contents'
+def test_1314():
+ '''
+ test that a large font size that produces an overflow in Pango is rejected
+ https://gitlab.com/graphviz/graphviz/-/issues/1314
+ '''
+
+ # locate our associated test case in this directory
+ input = os.path.join(os.path.dirname(__file__), '1314.dot')
+ assert os.path.exists(input), 'unexpectedly missing test case'
+
+ # ask Graphviz to process it, which should fail
+ try:
+ subprocess.check_call(['dot', '-Tsvg', '-o', os.devnull, input])
+ except subprocess.CalledProcessError:
+ return
+
+ # the execution did not fail as expected
+ pytest.fail('dot incorrectly exited with success')
+
def test_1436():
'''
test a segfault from https://gitlab.com/graphviz/graphviz/-/issues/1436 has