From 062d2ee6f798205c3046730d0d348cfd0d0bc09d Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 12 Feb 2013 03:05:45 +0000 Subject: * 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 --- ext/json/fbuffer/fbuffer.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ext/json/fbuffer/fbuffer.h') 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 #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; } -- cgit v1.2.3