You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In earlier version of Json::value constructor i.e. Value( const char *value ) was handling NULL as parameter gracefully But crashing In version jsoncpp 0.6.0.
Why this change is done, any specific issue related to that?
The text was updated successfully, but these errors were encountered:
The NULL literal isn't a const char_, so this would be very dangerous: Value(NULL). You don't know what constructor you're calling. Value(static_cast<const char_>(NULL)) would be more clear, but even then I think the code has a logical problem. A C++ std::string can be constructed with a (const char*)0 in the sense that it compiles, but it's undefined behavior. That string constructor requires that the argument point to an array of char, and passing 0 is a violation of that precondition.
In earlier version of Json::value constructor i.e. Value( const char *value ) was handling NULL as parameter gracefully But crashing In version jsoncpp 0.6.0.
Why this change is done, any specific issue related to that?
The text was updated successfully, but these errors were encountered: