f67ceb2007
from evince CVS
24 lines
772 B
Plaintext
24 lines
772 B
Plaintext
$OpenBSD: patch-ps_ps_c,v 1.1 2006/12/30 12:41:39 steven Exp $
|
|
--- ps/ps.c.orig Sat Dec 30 13:48:55 2006
|
|
+++ ps/ps.c Sat Dec 30 13:54:21 2006
|
|
@@ -1231,7 +1231,8 @@ get_next_text(line, next_char)
|
|
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 @@ get_next_text(line, next_char)
|
|
}
|
|
}
|
|
else {
|
|
- while(*line && !(*line == ' ' || *line == '\t' || *line == '\n'))
|
|
+ while(*line && !(*line == ' ' || *line == '\t' || *line == '\n')
|
|
+ && (cp - text) < PSLINELENGTH - 1)
|
|
*cp++ = *line++;
|
|
}
|
|
*cp = '\0';
|