(CCL_WRITE_MULTIBYTE_CHAR): Likewise.
+2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
+
+ * ccl.c (CCL_WRITE_CHAR): Fix overflow checking.
+ (CCL_WRITE_MULTIBYTE_CHAR): Likewise.
+
2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
* keyboard.c (make_ctrl_char): If C is a multibyte character, just
int bytes = SINGLE_BYTE_CHAR_P (ch) ? 1: CHAR_BYTES (ch); \
if (!dst) \
CCL_INVALID_CMD; \
- else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \
+ else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \
{ \
if (bytes == 1) \
{ \
int bytes = CHAR_BYTES (ch); \
if (!dst) \
CCL_INVALID_CMD; \
- else if (dst + bytes + extra_bytes < (dst_bytes ? dst_end : src)) \
+ else if (dst + bytes + extra_bytes <= (dst_bytes ? dst_end : src)) \
{ \
if (CHAR_VALID_P ((ch), 0)) \
dst += CHAR_STRING ((ch), dst); \