From: Vincent Untz Date: Thu, 17 Feb 2011 14:23:39 +0000 (+0100) Subject: backends: Fix another security issue in the dvi-backend X-Git-Tag: EVINCE_2_91_90~7 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=439c5070022eab6cef7266aab47f978058012c72;p=evince.git backends: Fix another security issue in the dvi-backend This is similar to one of the fixes from d4139205. https://bugzilla.gnome.org/show_bug.cgi?id=640923 --- diff --git a/backend/dvi/mdvi-lib/afmparse.c b/backend/dvi/mdvi-lib/afmparse.c index 361e23d6..e1cd1156 100644 --- a/backend/dvi/mdvi-lib/afmparse.c +++ b/backend/dvi/mdvi-lib/afmparse.c @@ -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) { ident[idx++] = ch; ch = fgetc(stream);