Second parameter of strcmp not NULL-checked before calling in these places :
bool
Value::CZString::operator<( const CZString &other ) const
{
if ( cstr_ )
return strcmp( cstr_, other.cstr_ ) < 0;
return index_ < other.index_;
}
bool
Value::CZString::operator==( const CZString &other ) const
{
if ( cstr_ )
return strcmp( cstr_, other.cstr_ ) == 0;
return index_ == other.index_;
}
We use
memcmp()
now, to allow embedded zeroes in UTF-8: https://github.com/open-source-parsers/jsoncpp/