aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-05-15 03:31:56 +0000
committerlloyd <[email protected]>2015-05-15 03:31:56 +0000
commita4e88fa2610da732ea1125b1ed970baed6d286bb (patch)
tree10e422f42bcf419bbcec835feb4f41c590286bbe /src/lib/stream
parent12eea2e817528e7d1a85e5e80b360eead6e5d206 (diff)
Fix various bugs found by Coverity scanner.
Uninitialized variables, missing divide by zero checks, missing virtual destructor, etc. Only thing serious is bug in TLS maximum fragment decoder; missing breaks in switch statement meant receiver would treat any negotiated max frament as 4k limit.
Diffstat (limited to 'src/lib/stream')
-rw-r--r--src/lib/stream/rc4/rc4.cpp2
-rw-r--r--src/lib/stream/salsa20/salsa20.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/stream/rc4/rc4.cpp b/src/lib/stream/rc4/rc4.cpp
index 096772314..3fd0d2276 100644
--- a/src/lib/stream/rc4/rc4.cpp
+++ b/src/lib/stream/rc4/rc4.cpp
@@ -114,6 +114,6 @@ void RC4::clear()
/*
* RC4 Constructor
*/
-RC4::RC4(size_t s) : SKIP(s) {}
+RC4::RC4(size_t s) : SKIP(s), X(0), Y(0) {}
}
diff --git a/src/lib/stream/salsa20/salsa20.h b/src/lib/stream/salsa20/salsa20.h
index d9f67bd24..a2b3790ce 100644
--- a/src/lib/stream/salsa20/salsa20.h
+++ b/src/lib/stream/salsa20/salsa20.h
@@ -38,7 +38,7 @@ class BOTAN_DLL Salsa20 : public StreamCipher
secure_vector<u32bit> m_state;
secure_vector<byte> m_buffer;
- size_t m_position;
+ size_t m_position = 0;
};
}