diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-03-23 10:23:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-03-23 10:23:49 +0000 |
commit | 071030190a7d45b6cca8cf71f9f513f4c12c50a1 (patch) | |
tree | b8b5e9de3fc46cd01c03baf288386a01e6a48170 | |
parent | f0314c16b1392a2021874136f80fd9350f16fe84 (diff) |
fixed buffer overflow in conv_jistoeuc().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@186 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/codeconv.c | 2 |
3 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2005-03-23 + + * src/codeconv.c: conv_jistoeuc(): fixed buffer overflow when + auxiliary Kanji appeared (only affects svn version after + 2005-03-17). + 2005-03-22 * src/codeconv.[ch]: return error value in every code conversion diff --git a/ChangeLog.ja b/ChangeLog.ja index 8a5c7d2a..0aaf2f77 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2005-03-23 + + * src/codeconv.c: conv_jistoeuc(): 補助漢字が出現したときの + バッファオーバーフローを修正(2005-03-17 以降の svn 版のみに影響)。 + 2005-03-22 * src/codeconv.[ch]: 全てのコード変換関数でエラー値を返すようにした。 diff --git a/src/codeconv.c b/src/codeconv.c index 7273af40..cf6021d6 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -136,7 +136,7 @@ static gchar *conv_jistoeuc(const gchar *inbuf, gint *error) JISState state = JIS_ASCII; gint error_ = 0; - outbuf = g_malloc(strlen(inbuf) + 1); + outbuf = g_malloc(strlen(inbuf) * 2 + 1); out = outbuf; while (*in != '\0') { |