aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr')
-rw-r--r--common/rdr/CMakeLists.txt1
-rw-r--r--common/rdr/InStream.cxx35
-rw-r--r--common/rdr/InStream.h11
-rw-r--r--common/rdr/OutStream.h10
4 files changed, 0 insertions, 57 deletions
diff --git a/common/rdr/CMakeLists.txt b/common/rdr/CMakeLists.txt
index 78778ddc..fa6ca281 100644
--- a/common/rdr/CMakeLists.txt
+++ b/common/rdr/CMakeLists.txt
@@ -9,7 +9,6 @@ add_library(rdr STATIC
FileInStream.cxx
HexInStream.cxx
HexOutStream.cxx
- InStream.cxx
RandomStream.cxx
TLSException.cxx
TLSInStream.cxx
diff --git a/common/rdr/InStream.cxx b/common/rdr/InStream.cxx
deleted file mode 100644
index a413b6c1..00000000
--- a/common/rdr/InStream.cxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-#include <rdr/InStream.h>
-#include <rdr/Exception.h>
-
-using namespace rdr;
-
-U32 InStream::maxStringLength = 65535;
-
-char* InStream::readString()
-{
- U32 len = readU32();
- if (len > maxStringLength)
- throw Exception("InStream max string length exceeded");
- char* str = new char[len+1];
- readBytes(str, len);
- str[len] = 0;
- return str;
-}
diff --git a/common/rdr/InStream.h b/common/rdr/InStream.h
index 46af74c9..5d873011 100644
--- a/common/rdr/InStream.h
+++ b/common/rdr/InStream.h
@@ -76,17 +76,6 @@ namespace rdr {
inline S16 readS16() { return (S16)readU16(); }
inline S32 readS32() { return (S32)readU32(); }
- // readString() reads a string - a U32 length followed by the data.
- // Returns a null-terminated string - the caller should delete[] it
- // afterwards.
-
- char* readString();
-
- // maxStringLength protects against allocating a huge buffer. Set it
- // higher if you need longer strings.
-
- static U32 maxStringLength;
-
inline void skip(size_t bytes) {
while (bytes > 0) {
size_t n = check(1, bytes);
diff --git a/common/rdr/OutStream.h b/common/rdr/OutStream.h
index 0d5f113e..f432520f 100644
--- a/common/rdr/OutStream.h
+++ b/common/rdr/OutStream.h
@@ -68,16 +68,6 @@ namespace rdr {
inline void writeS16(S16 s) { writeU16((U16)s); }
inline void writeS32(S32 s) { writeU32((U32)s); }
- // writeString() writes a string - a U32 length followed by the data. The
- // given string should be null-terminated (but the terminating null is not
- // written to the stream).
-
- inline void writeString(const char* str) {
- U32 len = strlen(str);
- writeU32(len);
- writeBytes(str, len);
- }
-
inline void pad(size_t bytes) {
while (bytes-- > 0) writeU8(0);
}