mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-19 12:20:17 -08:00
(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
|
|
@ -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
Add a link
Reference in a new issue