]> Git Repo - VerusCoin.git/blobdiff - src/script.h
Merge pull request #2336 from petertodd/invalid-opcode-coverage
[VerusCoin.git] / src / script.h
index f7cf7e8e9e7fe849cd6f7b37c9447954ef5c215f..4b29f6273c9f066a2bf924f5cb79e29cf9e39d9c 100644 (file)
@@ -17,6 +17,8 @@
 class CCoins;
 class CTransaction;
 
+static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
+
 /** Signature hash types/flags */
 enum
 {
@@ -32,6 +34,7 @@ enum
     SCRIPT_VERIFY_NONE      = 0,
     SCRIPT_VERIFY_P2SH      = (1U << 0),
     SCRIPT_VERIFY_STRICTENC = (1U << 1),
+    SCRIPT_VERIFY_NOCACHE   = (1U << 2),
 };
 
 enum txnouttype
@@ -434,7 +437,7 @@ public:
         // Immediate operand
         if (opcode <= OP_PUSHDATA4)
         {
-            unsigned int nSize;
+            unsigned int nSize = 0;
             if (opcode < OP_PUSHDATA1)
             {
                 nSize = opcode;
@@ -646,7 +649,7 @@ public:
 
     template<typename Stream>
     void Unserialize(Stream &s, int nType, int nVersion) {
-        unsigned int nSize;
+        unsigned int nSize = 0;
         s >> VARINT(nSize);
         if (nSize < nSpecialScripts) {
             std::vector<unsigned char> vch(GetSpecialSize(nSize), 0x00);
This page took 0.020438 seconds and 4 git commands to generate.