aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/Registry.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-09-23 11:00:17 +0200
committerPierre Ossman <ossman@cendio.se>2019-11-15 11:55:05 +0100
commit0943c006c7d900dfc0281639e992791d6c567438 (patch)
tree9393960c3d86df32f6186a6feeb4fecfec376699 /win/rfb_win32/Registry.h
parent4ff58f0acaeb566b79ae12cf013b376eaaaab834 (diff)
downloadtigervnc-0943c006c7d900dfc0281639e992791d6c567438.tar.gz
tigervnc-0943c006c7d900dfc0281639e992791d6c567438.zip
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.
Diffstat (limited to 'win/rfb_win32/Registry.h')
-rw-r--r--win/rfb_win32/Registry.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/rfb_win32/Registry.h b/win/rfb_win32/Registry.h
index 68d535cd..2bb16911 100644
--- a/win/rfb_win32/Registry.h
+++ b/win/rfb_win32/Registry.h
@@ -71,15 +71,15 @@ namespace rfb {
void setExpandString(const TCHAR* valname, const TCHAR* s) const;
void setString(const TCHAR* valname, const TCHAR* s) const;
- void setBinary(const TCHAR* valname, const void* data, int length) const;
+ void setBinary(const TCHAR* valname, const void* data, size_t length) const;
void setInt(const TCHAR* valname, int i) const;
void setBool(const TCHAR* valname, bool b) const;
TCHAR* getString(const TCHAR* valname) const;
TCHAR* getString(const TCHAR* valname, const TCHAR* def) const;
- void getBinary(const TCHAR* valname, void** data, int* length) const;
- void getBinary(const TCHAR* valname, void** data, int* length, void* def, int deflength) const;
+ void getBinary(const TCHAR* valname, void** data, size_t* length) const;
+ void getBinary(const TCHAR* valname, void** data, size_t* length, void* def, size_t deflength) const;
int getInt(const TCHAR* valname) const;
int getInt(const TCHAR* valname, int def) const;