diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 21:52:26 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 21:52:26 +0000 |
commit | c43e977e2896d57f616919a6c9c7301f7fae9804 (patch) | |
tree | 040feec70116df906c48901a0e86969e7f620078 /ext | |
parent | 09a7d0173b672e9ba2e0062bf23acbf232afe1cc (diff) |
ext/nkf/nkf-utf8/nkf.c: Backport #2953 [ruby-dev:40606]; change nkf_char buffer in numchar_getc() size form 8 to 10 to avoid potential for a segfault.
test/nkf/test_nkf.rb: Added a test for the change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/nkf/nkf-utf8/nkf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c index 9a31c9d879..168cbdbf8b 100644 --- a/ext/nkf/nkf-utf8/nkf.c +++ b/ext/nkf/nkf-utf8/nkf.c @@ -5004,7 +5004,7 @@ nkf_char numchar_getc(FILE *f) nkf_char (*g)(FILE *) = i_ngetc; nkf_char (*u)(nkf_char c ,FILE *f) = i_nungetc; int i = 0, j; - nkf_char buf[8]; + nkf_char buf[10]; long c = -1; buf[i] = (*g)(f); |