diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 00:12:05 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 00:12:05 +0000 |
commit | 0acaab201a821bc6591598775ffc6b6c4980ba9d (patch) | |
tree | 0dc788e458e1c53f0d91bdf1dae7022c66dcd948 /ext | |
parent | b5f05971f5349753966067e9af2555801a32c1ac (diff) |
* ext/date/date_core.c (date_strftime_alloc): followed the change
of r32885.
* doc/NEWS-1.9.3: followed the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-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; } |