Commit f289d375 authored by Kenichi Handa's avatar Kenichi Handa

(detect_coding): Don't overflow coding->carryover.

parent b691fa80
......@@ -5,6 +5,7 @@
2009-02-19 Kenichi Handa <handa@m17n.org>
* coding.c (detect_coding): Preserve coding->mode.
Don't overflow coding->carryover.
2009-02-18 Dan Nicolaescu <dann@ics.uci.edu>
......
......@@ -6805,6 +6805,8 @@ decode_coding (coding)
coding->carryover. */
unsigned char *p = coding->carryover;
if (nbytes > sizeof coding->carryover)
nbytes = sizeof coding->carryover;
coding->carryover_bytes = nbytes;
while (nbytes-- > 0)
*p++ = *src++;
......
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