[poppler] poppler/fofi: FoFiType1.cc,1.2,1.3
Kristian Hogsberg
krh at freedesktop.org
Wed Jul 27 06:34:15 EST 2005
Update of /cvs/poppler/poppler/fofi
In directory gabe:/tmp/cvs-serv19995/fofi
Modified Files:
FoFiType1.cc
Log Message:
2005-07-26 Kristian Høgsberg <krh at redhat.com>
* fofi/FoFiType1.cc: Make check for end of encoding array a bit
more liberal so we don't crash on complex encoding arrays (#3344).
Index: FoFiType1.cc
===================================================================
RCS file: /cvs/poppler/poppler/fofi/FoFiType1.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- FoFiType1.cc 30 Apr 2005 17:31:47 -0000 1.2
+++ FoFiType1.cc 26 Jul 2005 20:34:13 -0000 1.3
@@ -186,20 +186,13 @@
}
}
}
- } else {
- p = strtok(buf, " \t\n\r");
- if (p) {
- if (!strcmp(p, "def"))
- break;
- if (!strcmp(p, "readonly"))
- break;
- /* the spec does not says this but i'm mantaining old xpdf behaviour
- * that accepts "foo def" as end of the encoding array */
- p = strtok(NULL, " \t\n\r");
- if (p && !strcmp(p, "def"))
- break;
- }
- }
+ }
+
+ // Any line that begins with "def" or contains " def"
+ // terminates the encoding array.
+ if (!strcmp (p, "def") || strstr (buf, " def"))
+ break;
+
line = line1;
}
//~ check for getinterval/putinterval junk
More information about the poppler
mailing list