Mercurial > emacs
diff src/coding.c @ 102115:db1f94e25359
(detect_coding): Don't overflow coding->carryover.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 19 Feb 2009 04:23:32 +0000 |
| parents | a5023e8bbb1e |
| children | a12d39ca6870 |
line wrap: on
line diff
--- a/src/coding.c Thu Feb 19 03:33:09 2009 +0000 +++ b/src/coding.c Thu Feb 19 04:23:32 2009 +0000 @@ -6805,6 +6805,8 @@ 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++;
