Description
If an avro string contains a unicode escape sequence that begins with "\u" instead of "\U" an exception is thrown by the parser. The problematic code is at JsonIO.cc line 269.
JsonParser::Token JsonParser::tryString() { sv.clear(); for ( ; ;) { char ch = in_.read(); if (ch == '"') { return tkString; } else if (ch == '\\') { ch = in_.read(); switch (ch) { case '"': case '\\': case '/': sv.push_back(ch); continue; case 'b': sv.push_back('\b'); continue; case 'f': sv.push_back('\f'); continue; case 'n': sv.push_back('\n'); continue; case 'r': sv.push_back('\r'); continue; case 't': sv.push_back('\t'); continue; case 'U': { unsigned int n = 0; char e[4]; in_.readBytes(reinterpret_cast<uint8_t*>(e), 4); for (int i = 0; i < 4; i++) { n *= 16; char c = e[i]; if (isdigit(c)) { n += c - '0'; } else if (c >= 'a' && c <= 'f') { n += c - 'a' + 10; } else if (c >= 'A' && c <= 'F') { n += c - 'A' + 10; } else { unexpected(c); } } sv.push_back(n); } break; default: unexpected(ch); } } else { sv.push_back(ch); } } }