diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 00:15:50 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 00:15:50 +0000 |
commit | c8a403ebc47759d2a18ac381e1af93c48248ac58 (patch) | |
tree | 86fe45ebb65c36d8404b7c716cef0fd814ed48f2 /ext/date | |
parent | 7eab4f34ff30aa708aee58b1abab8e4a2772f46b (diff) |
* ext/date/date_core.c (date_strftime_alloc): followed the change
of r32885.
* NEWS: followed the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date')
-rw-r--r-- | ext/date/date_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c index 6474074028..c78eda47a9 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -6721,8 +6721,12 @@ date_strftime_alloc(char **buf, const char *format, * if the buffer is 1024 times bigger than the length of the * format string, it's not failing for lack of room. */ - if (len > 0 || size >= 1024 * flen) break; + if (len > 0) break; xfree(*buf); + if (size >= 1024 * flen) { + rb_sys_fail(format); + break; + } } return len; } |