From 6c9abf40849c32431903f3bf2765e7ea2db5bea7 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 28 Apr 2021 17:04:20 -0500 Subject: [PATCH] fuzz fix --- src/pixie/fontformats/opentype.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pixie/fontformats/opentype.nim b/src/pixie/fontformats/opentype.nim index d47ac2b..2c2f05a 100644 --- a/src/pixie/fontformats/opentype.nim +++ b/src/pixie/fontformats/opentype.nim @@ -649,6 +649,8 @@ proc parseGlyphPath(buf: string, offset, numberOfContours: int): Path = x = buf.readInt16(i).swap().int i += 2 prevX += x + if point >= points.len: + failUnsupported() points[point].x = prevX.float32 points[point].isOnCurve = (flag and 1) != 0