mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* util.c (mblen): fix overrun. [ruby-dev:22672]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4cc4305660
commit
2a2fa6fd8b
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Jan 29 23:56:00 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* util.c (mblen): fix overrun. [ruby-dev:22672]
|
||||
|
||||
Thu Jan 29 15:33:23 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/ossl_x509hame.c (ossl_x509name_initialize): change
|
||||
|
|
2
util.c
2
util.c
|
@ -296,6 +296,8 @@ mblen(const char *s, size_t n)
|
|||
if (s) {
|
||||
if (n == 0 || *s == 0)
|
||||
return 0;
|
||||
else if (!s[1])
|
||||
return 1;
|
||||
return dbcs_table[(unsigned char)*s] + 1;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue