diff options
| author | Kenichi Handa | 2008-02-01 00:38:48 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-01 00:38:48 +0000 |
| commit | 0acdaf8df50ab7c7ce9836e1246a4214a00e7c8f (patch) | |
| tree | 12029d6b2177e5c1899f98b4f90ed4cb0bddf764 /src | |
| parent | ece646ab10fa72c96ccb354bf963e2ee4445dd02 (diff) | |
| download | emacs-0acdaf8df50ab7c7ce9836e1246a4214a00e7c8f.tar.gz emacs-0acdaf8df50ab7c7ce9836e1246a4214a00e7c8f.zip | |
(CCL_WRITE_CHAR): Fix overflow checking.
(CCL_WRITE_MULTIBYTE_CHAR): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/ccl.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bef208cc3f9..54678a2dccf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp> | ||
| 2 | |||
| 3 | * ccl.c (CCL_WRITE_CHAR): Fix overflow checking. | ||
| 4 | (CCL_WRITE_MULTIBYTE_CHAR): Likewise. | ||
| 5 | |||
| 1 | 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp> | 6 | 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp> |
| 2 | 7 | ||
| 3 | * keyboard.c (make_ctrl_char): If C is a multibyte character, just | 8 | * keyboard.c (make_ctrl_char): If C is a multibyte character, just |
| @@ -748,7 +748,7 @@ while(0) | |||
| 748 | int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch); \ | 748 | int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch); \ |
| 749 | if (!dst) \ | 749 | if (!dst) \ |
| 750 | CCL_INVALID_CMD; \ | 750 | CCL_INVALID_CMD; \ |
| 751 | else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \ | 751 | else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \ |
| 752 | { \ | 752 | { \ |
| 753 | if (bytes == 1) \ | 753 | if (bytes == 1) \ |
| 754 | { \ | 754 | { \ |
| @@ -775,7 +775,7 @@ while(0) | |||
| 775 | int bytes = CHAR_BYTES (ch); \ | 775 | int bytes = CHAR_BYTES (ch); \ |
| 776 | if (!dst) \ | 776 | if (!dst) \ |
| 777 | CCL_INVALID_CMD; \ | 777 | CCL_INVALID_CMD; \ |
| 778 | else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \ | 778 | else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \ |
| 779 | { \ | 779 | { \ |
| 780 | if (CHAR_VALID_P ((ch), 0)) \ | 780 | if (CHAR_VALID_P ((ch), 0)) \ |
| 781 | dst += CHAR_STRING ((ch), dst); \ | 781 | dst += CHAR_STRING ((ch), dst); \ |