diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-02-26 08:59:01 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-02-26 08:59:01 +0000 |
commit | 5e6ab181a9942335f2633ef375cd91b25120de1c (patch) | |
tree | 3a2e438a3d81d7350ca80d0156767e9ba825d822 | |
parent | 0ad8279def2a2e6fb3f0b9bf35c39ce82652c64b (diff) | |
download | vte-5e6ab181a9942335f2633ef375cd91b25120de1c.tar.gz |
And finally clamp the maximum number of bytes transferred in a single
2007-02-26 Chris Wilson <chris@chris-wilson.co.uk>
* src/vte-private.h:
* src/vte.c: (vte_terminal_io_read):
And finally clamp the maximum number of bytes transferred in
a single chunk.
svn path=/trunk/; revision=1751
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/vte-private.h | 1 | ||||
-rw-r--r-- | src/vte.c | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2007-02-26 Chris Wilson <chris@chris-wilson.co.uk> + + * src/vte-private.h: + * src/vte.c: (vte_terminal_io_read): + And finally clamp the maximum number of bytes transferred in + a single chunk. + 2007-02-24 Chris Wilson <chris@chris-wilson.co.uk> * src/vte.c: diff --git a/src/vte-private.h b/src/vte-private.h index 47cbb642..9ebb64ba 100644 --- a/src/vte-private.h +++ b/src/vte-private.h @@ -82,6 +82,7 @@ G_BEGIN_DECLS #define VTE_REGCOMP_FLAGS REG_EXTENDED #define VTE_REGEXEC_FLAGS 0 #define VTE_INPUT_CHUNK_SIZE 0x2000 +#define VTE_MAX_INPUT_READ 0x1000 #define VTE_INVALID_BYTE '?' #define VTE_DISPLAY_TIMEOUT 10 #define VTE_UPDATE_TIMEOUT 15 @@ -3511,6 +3511,7 @@ vte_terminal_io_read(GIOChannel *channel, chunks = chunk; } rem = sizeof (chunk->data) - chunk->len; + rem = MIN (rem, VTE_MAX_INPUT_READ); bp = chunk->data + chunk->len; do { int ret = read (fd, bp, rem); |