Skip to content

Commit

Permalink
Patch #3539678: Copy constructor does not initialize allocated_ for s…
Browse files Browse the repository at this point in the history
…tringValue (contributed by rmongia).
  • Loading branch information
blep committed Apr 12, 2013
1 parent f871585 commit 3f12417
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ New in SVN
representable using an Int64, or asDouble() combined with minInt64 and
maxInt64 to figure out whether it is approximately representable.

* Bug fixes
- Patch #3539678: Copy constructor does not initialize allocated_ for stringValue
(contributed by rmongia).



New in JsonCpp 0.6.0:
---------------------
Expand Down
3 changes: 3 additions & 0 deletions src/lib_json/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ Value::Value( const Value &other )
allocated_ = true;
}
else
{
value_.string_ = 0;
allocated_ = false;
}
break;
#ifndef JSON_VALUE_USE_INTERNAL_MAP
case arrayValue:
Expand Down

0 comments on commit 3f12417

Please sign in to comment.