2012-01-16 13:42:56 +01:00
|
|
|
$NetBSD: patch-ai,v 1.4 2012/01/16 12:42:56 drochner Exp $
|
2011-03-08 18:13:33 +01:00
|
|
|
|
|
|
|
--- lib/t1lib/parseAFM.c.orig 2007-12-23 15:49:42.000000000 +0000
|
|
|
|
+++ lib/t1lib/parseAFM.c
|
|
|
|
@@ -199,7 +199,7 @@ static char *token(stream)
|
|
|
|
idx = 0;
|
|
|
|
|
|
|
|
while (ch != EOF && ch != ' ' && ch != CR && ch != LF &&
|
|
|
|
- ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'){
|
2012-01-16 13:42:56 +01:00
|
|
|
+ ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';' && idx < (MAX_NAME - 1)){
|
2011-03-08 18:13:33 +01:00
|
|
|
ident[idx++] = ch;
|
|
|
|
ch = fgetc(stream);
|
|
|
|
} /* while */
|
|
|
|
@@ -235,7 +235,7 @@ static char *linetoken(stream)
|
|
|
|
while ((ch = fgetc(stream)) == ' ' || ch == '\t' );
|
|
|
|
|
|
|
|
idx = 0;
|
|
|
|
- while (ch != EOF && ch != CR && ch != LF && ch != CTRL_Z)
|
2012-01-16 13:42:56 +01:00
|
|
|
+ while (ch != EOF && ch != CR && ch != LF && ch != CTRL_Z && idx < (MAX_NAME - 1))
|
2011-03-08 18:13:33 +01:00
|
|
|
{
|
|
|
|
ident[idx++] = ch;
|
|
|
|
ch = fgetc(stream);
|