mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Avoid dereference-of-casted-pointer
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "crypto/common.h"
|
||||
#include "prevector.h"
|
||||
#include "serialize.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <climits>
|
||||
@@ -404,6 +405,13 @@ public:
|
||||
CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { }
|
||||
CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { }
|
||||
|
||||
ADD_SERIALIZE_METHODS;
|
||||
|
||||
template <typename Stream, typename Operation>
|
||||
inline void SerializationOp(Stream& s, Operation ser_action) {
|
||||
READWRITE(static_cast<CScriptBase&>(*this));
|
||||
}
|
||||
|
||||
CScript& operator+=(const CScript& b)
|
||||
{
|
||||
insert(end(), b.begin(), b.end());
|
||||
|
||||
Reference in New Issue
Block a user