Skip to content

contains() is sometimes causing stack-based buffer overrun exceptions #1683

Description

@hokpe

First of all, this is very good c++ json library. thank you.

  • What is the issue you have?
    I noticed that the sw is sometimes throwing an exception (Stack cookie instrumentation code detected a stack-based buffer overrun.), when I was using json.contains("") method. It is not happening every time with the same data. So is there any other reports or similar observations noticed? I can't integrate this to our code base, if I'm uncertain about this library.

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?
    Because I'm not able to reproduce this every time, I can't provide such a code.
    But basically I read the json file using std::ifstream and then I was checking that is json object containing the attribute what I was looking for. And the value of that attribute was an object.

  • Which compiler and operating system are you using? Is it a supported compiler?
    Microsoft Visual C++ 2017, target platform Windows 10 (SDK 10.0.17134.0)

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

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