changeset 79984:88528794e364

(CCL_WRITE_CHAR): Fix overflow checking. (CCL_WRITE_MULTIBYTE_CHAR): Likewise.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Feb 2008 00:38:26 +0000
parents 8c0a8321e0a3
children f1a079917b01
files src/ccl.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ccl.c	Fri Feb 01 00:14:53 2008 +0000
+++ b/src/ccl.c	Fri Feb 01 00:38:26 2008 +0000
@@ -748,7 +748,7 @@
     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)							\
 	  {								\
@@ -775,7 +775,7 @@
     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);				\