]> www.fi.muni.cz Git - evince.git/blobdiff - backend/dvi/mdvi-lib/afmparse.c
[l10n] Updated German doc translation
[evince.git] / backend / dvi / mdvi-lib / afmparse.c
index 164366b03dd0b19bb8271e8a03775782b550eccd..f90e557567508f16a7664f9dd27f36e476f19a4f 100644 (file)
@@ -160,7 +160,7 @@ static char *token(FILE *stream)
     
     idx = 0;
     while (ch != EOF && ch != ' ' && ch != lineterm 
-           && ch != '\t' && ch != ':' && ch != ';'
+           && ch != '\t' && ch != ':' && ch != ';' && idx < (MAX_NAME - 1))
     {
         ident[idx++] = ch;
         ch = fgetc(stream);
@@ -190,7 +190,7 @@ static char *linetoken(FILE *stream)
     while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); 
     
     idx = 0;
-    while (ch != EOF && ch != lineterm
+    while (ch != EOF && ch != lineterm && idx < (MAX_NAME - 1))
     {
         ident[idx++] = ch;
         ch = fgetc(stream);