Browse Source

Merge pull request #2236 from chfast/fix_rlp_memcpy_undef

Eliminate undefied behavior in RLPStream
cl-refactor
Gav Wood 10 years ago
parent
commit
8ad43a159b
  1. 4
      libdevcore/RLP.cpp

4
libdevcore/RLP.cpp

@ -202,9 +202,7 @@ unsigned RLP::items() const
RLPStream& RLPStream::appendRaw(bytesConstRef _s, unsigned _itemCount)
{
unsigned os = m_out.size();
m_out.resize(os + _s.size());
memcpy(m_out.data() + os, _s.data(), _s.size());
m_out.insert(m_out.end(), _s.begin(), _s.end());
noteAppended(_itemCount);
return *this;
}

Loading…
Cancel
Save