(detect_coding): Don't overflow coding->carryover.
This commit is contained in:
parent
b691fa802f
commit
f289d37532
2 changed files with 3 additions and 0 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Reference in a new issue