[kaffe] CVS kaffe (kaz): libraries/clib/native/ByteToCharIconv.c
Kaffe CVS
cvs-commits at kaffe.org
Wed Jan 12 14:31:04 PST 2005
PatchSet 5838
Date: 2005/01/12 22:26:11
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2005-01-12 Ito Kazumitsu <kaz at maczuka.gcd.org>
* libraries/clib/native/ByteToCharIconv.c
(Java_kaffe_io_ByteToCharIconv_convert):
Check buffer overflow in the same way I did in CharToByteIconv.c.
Members:
ChangeLog:1.3382->1.3383
libraries/clib/native/ByteToCharIconv.c:1.12->1.13
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3382 kaffe/ChangeLog:1.3383
--- kaffe/ChangeLog:1.3382 Wed Jan 12 16:18:42 2005
+++ kaffe/ChangeLog Wed Jan 12 22:26:11 2005
@@ -1,5 +1,11 @@
2005-01-12 Ito Kazumitsu <kaz at maczuka.gcd.org>
+ * libraries/clib/native/ByteToCharIconv.c
+ (Java_kaffe_io_ByteToCharIconv_convert):
+ Check buffer overflow in the same way I did in CharToByteIconv.c.
+
+2005-01-12 Ito Kazumitsu <kaz at maczuka.gcd.org>
+
* libraries/clib/native/CharToByteIconv.c
(Java_kaffe_io_CharToByteIconv_convert):
Check whether errno == EILSEQ.
Index: kaffe/libraries/clib/native/ByteToCharIconv.c
diff -u kaffe/libraries/clib/native/ByteToCharIconv.c:1.12 kaffe/libraries/clib/native/ByteToCharIconv.c:1.13
--- kaffe/libraries/clib/native/ByteToCharIconv.c:1.12 Tue Dec 21 05:49:58 2004
+++ kaffe/libraries/clib/native/ByteToCharIconv.c Wed Jan 12 22:26:13 2005
@@ -86,7 +86,7 @@
ret = iconv (cd, (ICONV_CONST char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen);
if (ret < 0) {
/* convert the begining of an invalid multibyte sequence to '?' */
- if (errno == EILSEQ) {
+ if (errno == EILSEQ && icv_outlen >= 2) {
icv_in++;
icv_inlen--;
*(icv_out++) = 0;
More information about the kaffe
mailing list