[evince] backends: Fix another security issue in the dvi-backend



commit 439c5070022eab6cef7266aab47f978058012c72
Author: Vincent Untz <vuntz gnome org>
Date:   Thu Feb 17 15:23:39 2011 +0100

    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

 backend/dvi/mdvi-lib/afmparse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/backend/dvi/mdvi-lib/afmparse.c b/backend/dvi/mdvi-lib/afmparse.c
index 361e23d..e1cd115 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]