Skip to content

string value with null character causes infinite loop #2093

Description

@georgios-v
  • What is the issue you have?
    I receive a json which contains a null character within a string value. while traversing this json document, calling either is_string(), is_primitive(), or is_structured() on it causes an infinite loop
    this null character either exists in the original string, or is added by the parser

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?
    call https://www.instagram.com/bradpittofflcial/?__a=1
    parse the returned json document.
    traverse to graphql/user/biography
    call is_primitive() on it

  • What is the expected behavior?
    return boolean true

  • And what is the actual behavior instead?
    doesn't terminate

  • Which compiler and operating system are you using? Is it a supported compiler?
    linux, gcc-9.3

  • Did you use a released version of the library or the version from the develop branch?
    releashed

  • If you experience a compilation error: can you compile and run the unit tests?
    yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions