[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs buffer.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs buffer.c |
Date: |
Mon, 2 Jan 2017 23:55:24 -0500 (EST) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/01/02 23:55:24
Modified files:
. : buffer.c
Log message:
shell: fix crash on large process output
- fix `eb_fgets()`: used to return out of bound length.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/buffer.c?cvsroot=qemacs&r1=1.104&r2=1.105
Patches:
Index: buffer.c
===================================================================
RCS file: /sources/qemacs/qemacs/buffer.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- buffer.c 23 Dec 2016 19:51:48 -0000 1.104
+++ buffer.c 3 Jan 2017 04:55:24 -0000 1.105
@@ -2419,12 +2419,12 @@
if (c == '\n') {
/* end of line: offset points to the beginning of the next line */
/* adjust return value for easy stripping and truncation test */
- out->pos--;
+ out->len--;
break;
}
}
*offset_ptr = offset;
- return out->pos;
+ return out->len;
}
int eb_prev_line(EditBuffer *b, int offset)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs buffer.c,
Charlie Gordon <=