]> www.fi.muni.cz Git - evince.git/blobdiff - backend/dvi/mdvi-lib/afmparse.c
backends: Fix several security issues in the dvi-backend.
[evince.git] / backend / dvi / mdvi-lib / afmparse.c
index 164366b03dd0b19bb8271e8a03775782b550eccd..361e23d6ce1a1ab1d5f36b494966ac53b271ebf4 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)
     {
         ident[idx++] = ch;
         ch = fgetc(stream);