mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
Disable wrap_lines in put_cooked().
Enlarge buffer size for extra-long line. This fixes core dump which is rarely happened. PR: ports/26961 Submitted by: Yen-Ming Lee <leeym@cae.ce.ntu.edu.tw>
This commit is contained in:
parent
7796e40150
commit
1af9373f21
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=44425
@ -1,5 +1,5 @@
|
||||
--- src/cook.c.orig Sat Sep 23 14:34:20 2000
|
||||
+++ src/cook.c Sat Sep 23 14:34:41 2000
|
||||
--- src/cook.c.orig Mon Feb 19 22:59:13 2001
|
||||
+++ src/cook.c Mon Apr 30 02:57:21 2001
|
||||
@@ -109,7 +109,7 @@
|
||||
while (i++ < j)
|
||||
*q++ = ' ';
|
||||
@ -9,3 +9,11 @@
|
||||
*q++ = '^';
|
||||
*q++ = ((*p) & 0xFF) + '@';
|
||||
if (*p == '\f') /* ^L detected */
|
||||
@@ -147,6 +147,7 @@
|
||||
vsnprintf (buf, sizeof(buf) - 1, fmt, ap);
|
||||
|
||||
bufp = buf;
|
||||
+ wrap_lines = FALSE;
|
||||
|
||||
for (p = bufp; *p; p++) {
|
||||
if (*p == '\n' || ((overflow + p - bufp >= cCOLS) && wrap_lines)) {
|
||||
|
@ -1,20 +1,38 @@
|
||||
--- src/page.c.orig Wed Feb 21 03:18:52 2001
|
||||
+++ src/page.c Thu Apr 19 09:35:25 2001
|
||||
+++ src/page.c Mon Apr 30 03:28:06 2001
|
||||
@@ -844,7 +844,7 @@
|
||||
|
||||
search_line = curr_line; /* Reset search to start from top of display */
|
||||
|
||||
- buff = my_malloc(cCOLS+1); /* Need to account for \n */
|
||||
+ buff = my_malloc(LEN+1); /* Need to account for \n */
|
||||
|
||||
if (part == 0) {
|
||||
ClearScreen();
|
||||
@@ -867,7 +867,7 @@
|
||||
curr = &artline[curr_line+i];
|
||||
fseek (note_fp, curr->offset, SEEK_SET);
|
||||
|
||||
- fgets (buff, cCOLS+1, note_fp);
|
||||
+ fgets (buff, MAXPATHLEN, note_fp);
|
||||
+ fgets (buff, LEN+1, note_fp);
|
||||
|
||||
/*
|
||||
* rotN encoding on body and sig data only
|
||||
@@ -1186,7 +1186,7 @@
|
||||
@@ -886,7 +886,7 @@
|
||||
strip_line(buff);
|
||||
|
||||
make_group_path (CURR_GROUP.name, group_path);
|
||||
#ifndef USE_CURSES
|
||||
- snprintf (screen[i+PAGE_HEADER].col, cCOLS, "%s" cCRLF, buff);
|
||||
+ snprintf (screen[i+PAGE_HEADER].col, LEN, "%s" cCRLF, buff);
|
||||
#endif /* !USE_CURSES */
|
||||
|
||||
- switch (art_open (TRUE, &arts[new_respnum], group_path, &pgart)) {
|
||||
+ switch (art_open (FALSE, &arts[new_respnum], group_path, &pgart)) {
|
||||
MoveCursor (i+PAGE_HEADER, 0);
|
||||
@@ -1346,7 +1346,7 @@
|
||||
chunk += 50;
|
||||
pgart.rawl = my_realloc((char *)pgart.rawl, sizeof(t_lineinfo) * chunk);
|
||||
}
|
||||
- } while ((fgets(buff, cCOLS+1, pgart.raw)) != NULL);
|
||||
+ } while ((fgets(buff, LEN+1, pgart.raw)) != NULL);
|
||||
|
||||
case ART_UNAVAILABLE:
|
||||
art_mark_read (&CURR_GROUP, &arts[new_respnum]);
|
||||
j--;
|
||||
pgart.rawl = my_realloc((char *)pgart.rawl, sizeof(t_lineinfo) * j);
|
||||
|
Loading…
Reference in New Issue
Block a user