--- evince-0.6.0/ps/ps.c.overflow 2006-12-10 21:59:29.000000000 -0500 +++ evince-0.6.0/ps/ps.c 2006-12-10 21:59:34.000000000 -0500 @@ -1231,7 +1231,8 @@ int level = 0; quoted = 1; line++; - while(*line && !(*line == ')' && level == 0)) { + while(*line && !(*line == ')' && level == 0) + && (cp - text) < PSLINELENGTH - 1) { if(*line == '\\') { if(*(line + 1) == 'n') { *cp++ = '\n'; @@ -1302,7 +1303,8 @@ } } else { - while(*line && !(*line == ' ' || *line == '\t' || *line == '\n')) + while(*line && !(*line == ' ' || *line == '\t' || *line == '\n') + && (cp - text) < PSLINELENGTH - 1) *cp++ = *line++; } *cp = '\0';