diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-12 03:05:45 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-12 03:05:45 +0000 |
commit | 062d2ee6f798205c3046730d0d348cfd0d0bc09d (patch) | |
tree | 8be6c2e72c796c481906978565bc116661e4fe9a /ext/json/fbuffer/fbuffer.h | |
parent | f1194eb9b08b7c7be39e168c1f9620e377bee472 (diff) |
* ext/json: merge JSON 1.7.7.
This includes security fix. [CVE-2013-0269]
https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2
https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/fbuffer/fbuffer.h')
-rw-r--r-- | ext/json/fbuffer/fbuffer.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/json/fbuffer/fbuffer.h b/ext/json/fbuffer/fbuffer.h index b5e47eec42..af74187566 100644 --- a/ext/json/fbuffer/fbuffer.h +++ b/ext/json/fbuffer/fbuffer.h @@ -3,7 +3,6 @@ #define _FBUFFER_H_ #include "ruby.h" -#include <assert.h> #ifndef RHASH_SIZE #define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries) @@ -166,11 +165,8 @@ static FBuffer *fbuffer_dup(FBuffer *fb) unsigned long len = fb->len; FBuffer *result; - assert(len > 0); - if (len > 0) { - result = fbuffer_alloc(len); - fbuffer_append(result, FBUFFER_PAIR(fb)); - } + result = fbuffer_alloc(len); + fbuffer_append(result, FBUFFER_PAIR(fb)); return result; } |