projects
/
platform
/
upstream
/
jsoncpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd91914
)
Fix a border case which causes Value::CommentInfo::setComment() to crash
author
datadiode
<jochen.neubeck@vodafone.de>
Sun, 25 Jan 2015 10:01:22 +0000
(11:01 +0100)
committer
Christopher Dunn
<cdunn2001@gmail.com>
Sun, 25 Jan 2015 17:19:51 +0000
(11:19 -0600)
re: pull #140
src/lib_json/json_value.cpp
patch
|
blob
|
history
diff --git
a/src/lib_json/json_value.cpp
b/src/lib_json/json_value.cpp
index
1a1c763
..
150eff9
100644
(file)
--- a/
src/lib_json/json_value.cpp
+++ b/
src/lib_json/json_value.cpp
@@
-142,8
+142,10
@@
Value::CommentInfo::~CommentInfo() {
}
void Value::CommentInfo::setComment(const char* text) {
- if (comment_)
+ if (comment_)
{
releaseStringValue(comment_);
+ comment_ = 0;
+ }
JSON_ASSERT(text != 0);
JSON_ASSERT_MESSAGE(
text[0] == '\0' || text[0] == '/',