File: patch-2

package info (click to toggle)
vftool 2.0alpha-4%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 388 kB
  • ctags: 769
  • sloc: ansic: 2,748; makefile: 190; sh: 79
file content (21 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Vincent Untz <vuntz@gnome.org>
Date: Thu, 17 Feb 2011 15:23:39 +0100
Subject: [PATCH] backends: Fix another security issue in the dvi-backend
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=640923
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614669

This is similar to one of the fixes from d4139205.

https://bugzilla.gnome.org/show_bug.cgi?id=640923

--- vftool-2.0alpha.orig/parseAFM.c
+++ vftool-2.0alpha/parseAFM.c
@@ -178,7 +178,7 @@
     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);