Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70e9c33

Browse files
committed
Fix a segfault in font conversion.
1 parent 79deb35 commit 70e9c33

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ttconv/pprdrv_tt2.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,22 @@ void GlyphToType3::PSConvert(TTStreamWriter& stream)
226226

227227
// For any two consecutive off-path points, insert the implied
228228
// on-path point.
229+
230+
if (points.size() == 0) {
231+
k=nextinctr(i,k);
232+
233+
if (k==NOMOREINCTR)
234+
{
235+
i=k=nextoutctr(i);
236+
}
237+
238+
if (i==NOMOREOUTCTR)
239+
{
240+
break;
241+
}
242+
continue;
243+
}
244+
229245
FlaggedPoint prev = points.back();
230246
for (std::list<FlaggedPoint>::iterator it = points.begin();
231247
it != points.end();

0 commit comments

Comments
 (0)