diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-08 21:16:43 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-08 21:16:43 -0400 |
commit | 623c57a623eae8e2e79af7bfe1680e507e5d333c (patch) | |
tree | fd524ed38278adc68861edd36dad3de1da74dfb3 | |
parent | 3924a3da10145ede4a831a58ac184d3658d48aca (diff) | |
download | fork-ledger-623c57a623eae8e2e79af7bfe1680e507e5d333c.tar.gz fork-ledger-623c57a623eae8e2e79af7bfe1680e507e5d333c.tar.bz2 fork-ledger-623c57a623eae8e2e79af7bfe1680e507e5d333c.zip |
Terminate the buffer used to read in item context.
-rw-r--r-- | src/item.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/item.cc b/src/item.cc index cb69909f..44a80e63 100644 --- a/src/item.cc +++ b/src/item.cc @@ -339,6 +339,8 @@ string item_context(const item_t& item, const string& desc) scoped_array<char> buf(new char[len + 1]); in.read(buf.get(), len); + assert(static_cast<std::size_t>(in.gcount()) == len); + buf[len] = '\0'; std::ostringstream out; |