diff options
| author | Kenichi Handa | 2000-08-16 01:36:35 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-08-16 01:36:35 +0000 |
| commit | 904a2edd5c4fdf7a584252b3f0e1fe21bd4f7f1f (patch) | |
| tree | dfd1a2c4970d29226a713bb3acda68525a8c4f5e /src | |
| parent | 290602fd0af3deaf34ac60d9b4f3165d01381f7f (diff) | |
| download | emacs-904a2edd5c4fdf7a584252b3f0e1fe21bd4f7f1f.tar.gz emacs-904a2edd5c4fdf7a584252b3f0e1fe21bd4f7f1f.zip | |
(CCL_WRITE_CHAR): If CH is eight-bit-control char, decrement dst_end
to avoid buffer overflow in the later call of string_as_multibyte
Diffstat (limited to 'src')
| -rw-r--r-- | src/ccl.c | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -685,7 +685,13 @@ static tr_stack *mapping_stack_pointer; | |||
| 685 | *dst++ = '\n'; \ | 685 | *dst++ = '\n'; \ |
| 686 | } \ | 686 | } \ |
| 687 | else if (bytes == 1) \ | 687 | else if (bytes == 1) \ |
| 688 | *dst++ = (ch); \ | 688 | { \ |
| 689 | *dst++ = (ch); \ | ||
| 690 | if ((ch) >= 0x80 && (ch) < 0xA0) \ | ||
| 691 | /* We may have to convert this eight-bit char to \ | ||
| 692 | multibyte form later. */ \ | ||
| 693 | dst_end--; \ | ||
| 694 | } \ | ||
| 689 | else \ | 695 | else \ |
| 690 | dst += CHAR_STRING (ch, dst); \ | 696 | dst += CHAR_STRING (ch, dst); \ |
| 691 | } \ | 697 | } \ |