aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2015-12-23 12:34:24 +0100
committerDaniel Neus <[email protected]>2015-12-23 12:34:24 +0100
commit8b7a31fbfcbbd47f34f4f4edad4d05f25a9d0ecd (patch)
tree296b1611990545af0e290c59e8bd896083e7ae24
parentaedb8d8ef646ed480296eb0a53513c74475cef08 (diff)
initialize private members in rc4 header
-rw-r--r--src/lib/stream/rc4/rc4.cpp2
-rw-r--r--src/lib/stream/rc4/rc4.h7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/stream/rc4/rc4.cpp b/src/lib/stream/rc4/rc4.cpp
index d94bf8164..9a6268b8c 100644
--- a/src/lib/stream/rc4/rc4.cpp
+++ b/src/lib/stream/rc4/rc4.cpp
@@ -111,6 +111,6 @@ void RC4::clear()
/*
* RC4 Constructor
*/
-RC4::RC4(size_t s) : SKIP(s), X(0), Y(0), state(), buffer(), position(0) {}
+RC4::RC4(size_t s) : SKIP(s) {}
}
diff --git a/src/lib/stream/rc4/rc4.h b/src/lib/stream/rc4/rc4.h
index 60c9450b4..9c4b2717c 100644
--- a/src/lib/stream/rc4/rc4.h
+++ b/src/lib/stream/rc4/rc4.h
@@ -44,12 +44,11 @@ class BOTAN_DLL RC4 : public StreamCipher
void generate();
const size_t SKIP;
-
- byte X, Y;
+ byte X = 0;
+ byte Y = 0;
secure_vector<byte> state;
-
secure_vector<byte> buffer;
- size_t position;
+ size_t position = 0;
};
}