mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
-- YAML.load time correctly parse usecs smaller than 1 fixes #4571 Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> -- ChangeLog for it -- * ext/syck/rubyext.c (mktime_do): avoid buffer overrun, by silently ignoring lesser significant digits. Required buffer length can be computable so you might at first think of allocating enough memory space on the fly using alloca(). That is a wrong idea because when using alloca there is always risk of integer overflow. A function that accepts outer-process resources like this should not blindly trust its inputs. In this particular case we just want to generate miliseconds resolution by strtod() so the string in question needs no more length than what we originally have. Ignoring lesser significant digits should suffice I believe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
|---|---|---|
| .. | ||
| lib | ||
| .cvsignore | ||
| bytecode.c | ||
| depend | ||
| emitter.c | ||
| extconf.rb | ||
| gram.c | ||
| gram.h | ||
| handler.c | ||
| implicit.c | ||
| node.c | ||
| rubyext.c | ||
| syck.c | ||
| syck.h | ||
| token.c | ||
| yaml2byte.c | ||
| yamlbyte.h | ||