pkgsrc/print/evince/patches/patch-ba

22 lines
802 B
Text

$NetBSD: patch-ba,v 1.3 2012/01/16 12:42:56 drochner Exp $
--- backend/dvi/mdvi-lib/afmparse.c.orig 2009-04-24 07:24:16.000000000 +0000
+++ backend/dvi/mdvi-lib/afmparse.c
@@ -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);