Commit 33fe1ba1 authored by Chris Wilson's avatar Chris Wilson Committed by Chris Wilson
Browse files

Bug 483642 – vte_terminal_feed crash when 8190 characters passed

2007-10-05  Chris Wilson  <chris@chris-wilson.co.uk>

    Bug 483642 – vte_terminal_feed crash when 8190 characters passed

    * src/vte.c (vte_terminal_feed):
        Break the feed data into chunks.


svn path=/trunk/; revision=1958
parent da32ed96
2007-10-05 Chris Wilson <chris@chris-wilson.co.uk>
Bug 483642 vte_terminal_feed crash when 8190 characters passed
* src/vte.c (vte_terminal_feed):
Break the feed data into chunks.
2007-09-30 Chris Wilson <chris@chris-wilson.co.uk>
* src/vtexft.c (_vte_xft_set_background_image):
......
......@@ -3719,8 +3719,20 @@ vte_terminal_feed(VteTerminal *terminal, const char *data, glong length)
chunk = get_chunk ();
_vte_terminal_feed_chunks (terminal, chunk);
}
memcpy (chunk->data + chunk->len, data, length);
chunk->len += length;
do { /* break the incoming data into chunks */
gsize rem = sizeof (chunk->data) - chunk->len;
gsize len = length < rem ? length : rem;
memcpy (chunk->data + chunk->len, data, len);
chunk->len += len;
length -= len;
if (length == 0) {
break;
}
data += len;
chunk = get_chunk ();
_vte_terminal_feed_chunks (terminal, chunk);
} while (1);
vte_terminal_start_processing (terminal);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment