Browse Source

[2426] Initialize rdlen (apparently cppcheck doesn't detect the throw and complains)

Mukund Sivaraman 11 years ago
parent
commit
8ec8a19d23
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/dns/rdata.cc

+ 2 - 1
src/lib/dns/rdata.cc

@@ -221,7 +221,8 @@ Generic::constructFromLexer(MasterLexer& lexer) {
                   "unknown RDATA encoding");
     }
 
-    uint32_t rdlen;
+    // Initialize with an absurd value.
+    uint32_t rdlen = 65536;
 
     try {
         rdlen = lexer.getNextToken(MasterToken::NUMBER).getNumber();