forked from pool/fontforge
Petr Gajdos
ac74b169c8
+ fontforge-eof-crash.patch OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=58
17 lines
552 B
Diff
17 lines
552 B
Diff
Index: fontforge/parsettf.c
|
|
===================================================================
|
|
--- fontforge/parsettf.c.orig 2016-01-26 09:01:44.025472518 +0100
|
|
+++ fontforge/parsettf.c 2016-01-26 09:04:24.853470665 +0100
|
|
@@ -5185,7 +5185,10 @@
|
|
/* the index table is backwards from the way I want to use it */
|
|
gcbig = 0;
|
|
for ( i=0; i<gc; ++i ) {
|
|
- indexes[val = getushort(ttf)] = i;
|
|
+ val = getushort(ttf);
|
|
+ if ( val<0 ) /* Don't crash on EOF */
|
|
+ break;
|
|
+ indexes[val] = i;
|
|
if ( val>=258 ) ++gcbig;
|
|
}
|
|
|