mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/json: merge JSON 1.7.7.
This includes security fix. [CVE-2013-0269]
d0a62f3ced
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
This commit is contained in:
parent
f1194eb9b0
commit
062d2ee6f7
20 changed files with 269 additions and 99 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue