Backport #5888 » ruby-1.9.3-fix-json-parser.patch
ext/json/parser/parser.c | ||
---|---|---|
{
|
||
char *p = string, *pe = string, *unescape;
|
||
int unescape_len;
|
||
char buf[4];
|
||
while (pe < stringEnd) {
|
||
if (*pe == '\\') {
|
||
... | ... | |
if (pe > stringEnd - 4) {
|
||
return Qnil;
|
||
} else {
|
||
char buf[4];
|
||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||
pe += 3;
|
||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
ext/json/parser/parser.rl | ||
---|---|---|
{
|
||
char *p = string, *pe = string, *unescape;
|
||
int unescape_len;
|
||
char buf[4];
|
||
while (pe < stringEnd) {
|
||
if (*pe == '\\') {
|
||
... | ... | |
if (pe > stringEnd - 4) {
|
||
return Qnil;
|
||
} else {
|
||
char buf[4];
|
||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||
pe += 3;
|
||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
- « Previous
- 1
- 2
- 3
- 4
- Next »