mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-30 08:00:03 +00:00
[idl_parser] Unify parsing of NaN values read from .fbs and .json files (#6296)
This commit unifies parsing of NaN values read from .fbs and .json files by converting them to unsigned NaN.
This commit is contained in:
@@ -288,7 +288,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
}
|
||||
|
||||
// Parse original input as-is.
|
||||
auto orig_scalar = "{ \"Y\" : " + input + " }";
|
||||
auto orig_scalar = "{\"Y\" : " + input + "}";
|
||||
std::string orig_back;
|
||||
auto orig_done = Parse(parser, orig_scalar, &orig_back);
|
||||
|
||||
@@ -326,7 +326,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
// Test quoted version of the string
|
||||
if (!qouted_input.empty()) {
|
||||
auto fix_scalar = "{ \"Y\" : " + qouted_input + " }";
|
||||
auto fix_scalar = "{\"Y\" : " + qouted_input + "}";
|
||||
std::string fix_back;
|
||||
auto fix_done = Parse(parser, fix_scalar, &fix_back);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user