Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because of bugs in the calculations. Also does the same to CharArray and friends as they were strongly connection to the stream objects.
This commit is contained in:
committed by
Lauri Kasanen
parent
346fccb96c
commit
259f1055cb
@@ -28,7 +28,7 @@ namespace rfb {
|
||||
public:
|
||||
PlainPasswd();
|
||||
PlainPasswd(char* pwd);
|
||||
PlainPasswd(int len);
|
||||
PlainPasswd(size_t len);
|
||||
PlainPasswd(const ObfuscatedPasswd& obfPwd);
|
||||
~PlainPasswd();
|
||||
void replaceBuf(char* b);
|
||||
@@ -37,10 +37,10 @@ namespace rfb {
|
||||
class ObfuscatedPasswd : public CharArray {
|
||||
public:
|
||||
ObfuscatedPasswd();
|
||||
ObfuscatedPasswd(int l);
|
||||
ObfuscatedPasswd(size_t l);
|
||||
ObfuscatedPasswd(const PlainPasswd& plainPwd);
|
||||
~ObfuscatedPasswd();
|
||||
int length;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user