diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-01-25 08:27:30 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-01-25 08:27:30 +0100 |
commit | 85eb74ccd16898b513f14aa7aad10e9158efab47 (patch) | |
tree | eaee024e1a82cc6b5f0bd438e88866e114fe2092 | |
parent | Fixed ICE-7521 - Windows tries to run Objective-C tests (diff) | |
download | ice-85eb74ccd16898b513f14aa7aad10e9158efab47.tar.bz2 ice-85eb74ccd16898b513f14aa7aad10e9158efab47.tar.xz ice-85eb74ccd16898b513f14aa7aad10e9158efab47.zip |
Fixed ICE-7281 - skipEmptyEncapsulation now checks for the encoding version
-rw-r--r-- | cpp/include/Ice/InputStream.h | 2 | ||||
-rw-r--r-- | csharp/src/Ice/InputStream.cs | 2 | ||||
-rw-r--r-- | java-compat/src/Ice/src/main/java/Ice/InputStream.java | 2 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java | 2 | ||||
-rw-r--r-- | js/src/Ice/Stream.js | 24 |
5 files changed, 21 insertions, 11 deletions
diff --git a/cpp/include/Ice/InputStream.h b/cpp/include/Ice/InputStream.h index 552289a69f4..a6cad15a451 100644 --- a/cpp/include/Ice/InputStream.h +++ b/cpp/include/Ice/InputStream.h @@ -266,6 +266,8 @@ public: } Ice::EncodingVersion encoding; read(encoding); + IceInternal::checkSupportedEncoding(encoding); // Make sure the encoding is supported + if(encoding == Ice::Encoding_1_0) { if(sz != static_cast<Ice::Int>(sizeof(Ice::Int)) + 2) diff --git a/csharp/src/Ice/InputStream.cs b/csharp/src/Ice/InputStream.cs index eec49215d05..9c6cca1c2df 100644 --- a/csharp/src/Ice/InputStream.cs +++ b/csharp/src/Ice/InputStream.cs @@ -628,6 +628,8 @@ namespace Ice var encoding = new EncodingVersion(); encoding.ice_readMembers(this); + Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. + if(encoding.Equals(Util.Encoding_1_0)) { if(sz != 6) diff --git a/java-compat/src/Ice/src/main/java/Ice/InputStream.java b/java-compat/src/Ice/src/main/java/Ice/InputStream.java index eab7649730f..d3f1c597205 100644 --- a/java-compat/src/Ice/src/main/java/Ice/InputStream.java +++ b/java-compat/src/Ice/src/main/java/Ice/InputStream.java @@ -651,6 +651,8 @@ public class InputStream } EncodingVersion encoding = EncodingVersion.ice_read(this, null); + IceInternal.Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. + if(encoding.equals(Ice.Util.Encoding_1_0)) { if(sz != 6) diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java b/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java index e9168100e18..7ae9b830ac8 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/InputStream.java @@ -655,6 +655,8 @@ public class InputStream } EncodingVersion encoding = EncodingVersion.ice_read(this, null); + Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. + if(encoding.equals(Util.Encoding_1_0)) { if(sz != 6) diff --git a/js/src/Ice/Stream.js b/js/src/Ice/Stream.js index bb9e80f3c25..6dc5c613d7d 100644 --- a/js/src/Ice/Stream.js +++ b/js/src/Ice/Stream.js @@ -37,11 +37,11 @@ const TraceUtil = Ice.TraceUtil; const ArrayUtil = Ice.ArrayUtil; const SlicedData = Ice.SlicedData; -const SliceType = +const SliceType = { NoSlice: 0, ValueSlice: 1, - ExceptionSlice: 2 + ExceptionSlice: 2 }; // @@ -1266,7 +1266,7 @@ class InputStream swap(other) { Debug.assert(this._instance === other._instance); - + [other._buf, this._buf] = [this._buf, other._buf]; [other._encoding, this._encoding] = [this._encoding, other._encoding]; [other._traceSlicing, this._traceSlicing] = [this._traceSlicing, other._traceSlicing]; @@ -1422,6 +1422,8 @@ class InputStream const encoding = new Ice.EncodingVersion(); encoding._read(this); + Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. + if(encoding.equals(Ice.Encoding_1_0)) { if(sz != 6) @@ -2094,7 +2096,7 @@ class InputStream this._logger); } } - + // // Sets the value factory manager to use when marshaling value instances. If the stream // was initialized with a communicator, the communicator's value factory manager will @@ -2124,7 +2126,7 @@ class InputStream { this._logger = value !== undefined ? value : null; } - + // // Sets the compact ID resolver to use when unmarshaling value and exception // instances. If the stream was initialized with a communicator, the communicator's @@ -2158,7 +2160,7 @@ class InputStream { this._sliceValues = value; } - + // // Determines whether the stream logs messages about slicing instances of Slice values. // @@ -2171,7 +2173,7 @@ class InputStream { this._traceSlicing = value; } - + get pos() { return this._buf.position; @@ -2196,7 +2198,7 @@ class InputStream { return this._type; } - + set closure(value) { this._type = value; @@ -3326,7 +3328,7 @@ class OutputStream } } } - + // // Sets the encoding format for class and exception instances. // @@ -3384,7 +3386,7 @@ const defineBuiltinHelper = function(write, read, sz, format, min, max) { return write.call(os, v); } - + static read(is) { return read.call(is); @@ -3399,7 +3401,7 @@ const defineBuiltinHelper = function(write, read, sz, format, min, max) { return is.readOptionalHelper(tag, format, read); } - + static get minWireSize() { return sz; |