zeroc-ice 3.8.1 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +26 -9
- data/dist/IceRuby/Config.h +0 -12
- data/dist/IceRuby/Connection.cpp +18 -9
- data/dist/IceRuby/DefaultSliceLoader.h +1 -1
- data/dist/IceRuby/Endpoint.cpp +21 -8
- data/dist/IceRuby/Operation.cpp +29 -11
- data/dist/IceRuby/Properties.cpp +3 -4
- data/dist/IceRuby/Proxy.cpp +11 -19
- data/dist/IceRuby/RubySliceLoader.cpp +1 -1
- data/dist/IceRuby/RubySliceLoader.h +6 -0
- data/dist/IceRuby/Types.cpp +162 -138
- data/dist/IceRuby/Types.h +68 -28
- data/dist/IceRuby/Util.cpp +14 -78
- data/dist/IceRuby/Util.h +7 -17
- data/dist/ice/cpp/include/Ice/Communicator.h +31 -8
- data/dist/ice/cpp/include/Ice/Config.h +2 -2
- data/dist/ice/cpp/include/Ice/Connection.h +24 -8
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +1 -1
- data/dist/ice/cpp/include/Ice/Demangle.h +1 -1
- data/dist/ice/cpp/include/Ice/Endpoint.h +4 -4
- data/dist/ice/cpp/include/Ice/Initialize.h +4 -4
- data/dist/ice/cpp/include/Ice/InputStream.h +5 -5
- data/dist/ice/cpp/include/Ice/Instrumentation.h +13 -7
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +26 -5
- data/dist/ice/cpp/include/Ice/Logger.h +7 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +1 -1
- data/dist/ice/cpp/include/Ice/Object.h +10 -8
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +1 -1
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +5 -2
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +2 -1
- data/dist/ice/cpp/include/Ice/OutputStream.h +14 -11
- data/dist/ice/cpp/include/Ice/PluginFactory.h +1 -1
- data/dist/ice/cpp/include/Ice/Properties.h +3 -3
- data/dist/ice/cpp/include/Ice/Proxy.h +192 -50
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +3 -3
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +1 -1
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +5 -5
- data/dist/ice/cpp/include/Ice/ServantLocator.h +1 -1
- data/dist/ice/cpp/include/Ice/Service.h +2 -5
- data/dist/ice/cpp/include/Ice/SliceLoader.h +1 -1
- data/dist/ice/cpp/include/Ice/SlicedData.h +5 -3
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +1 -1
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +2 -2
- data/dist/ice/cpp/include/Ice/StringConverter.h +2 -3
- data/dist/ice/cpp/include/Ice/StringUtil.h +2 -7
- data/dist/ice/cpp/include/Ice/UUID.h +1 -0
- data/dist/ice/cpp/include/Ice/Value.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Context.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Identity.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Locator.h +57 -23
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +38 -11
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +99 -44
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Process.h +34 -8
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +42 -11
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +93 -40
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +8 -4
- data/dist/ice/cpp/include/generated/Ice/Router.h +55 -19
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +2 -2
- data/dist/ice/cpp/include/generated/Ice/Version.h +2 -2
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +66 -14
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +34 -8
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +1 -1
- data/dist/ice/cpp/src/Ice/Base64.cpp +47 -137
- data/dist/ice/cpp/src/Ice/Base64.h +2 -2
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +28 -13
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +5 -1
- data/dist/ice/cpp/src/Ice/Buffer.cpp +1 -1
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +6 -4
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/Communicator.cpp +4 -3
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +8 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +5 -15
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +6 -8
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +0 -3
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +121 -108
- data/dist/ice/cpp/src/Ice/ConnectionI.h +12 -9
- data/dist/ice/cpp/src/Ice/ConsoleUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +10 -14
- data/dist/ice/cpp/src/Ice/EndpointI.h +1 -1
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +15 -79
- data/dist/ice/cpp/src/Ice/FileUtil.h +0 -3
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +1 -1
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +1 -1
- data/dist/ice/cpp/src/Ice/HttpParser.h +0 -2
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +4 -0
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +6 -3
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +2 -4
- data/dist/ice/cpp/src/Ice/InputStream.cpp +50 -33
- data/dist/ice/cpp/src/Ice/Instance.cpp +73 -50
- data/dist/ice/cpp/src/Ice/Instance.h +1 -6
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +7 -1
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +2 -2
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +13 -18
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/LoggerI.h +2 -2
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +6 -1
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +22 -18
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +5 -2
- data/dist/ice/cpp/src/Ice/Network.cpp +168 -103
- data/dist/ice/cpp/src/Ice/Network.h +12 -7
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +17 -6
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +2 -1
- data/dist/ice/cpp/src/Ice/Object.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +56 -19
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +10 -10
- data/dist/ice/cpp/src/Ice/Options.cpp +7 -2
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +2 -2
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +127 -127
- data/dist/ice/cpp/src/Ice/OutgoingResponseInternal.h +21 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +50 -65
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +7 -1
- data/dist/ice/cpp/src/Ice/Properties.cpp +26 -16
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +2 -1
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +1 -1
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +0 -11
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +1 -2
- data/dist/ice/cpp/src/Ice/Proxy.cpp +9 -1
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +110 -13
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +4 -4
- data/dist/ice/cpp/src/Ice/Random.cpp +68 -7
- data/dist/ice/cpp/src/Ice/Random.h +6 -2
- data/dist/ice/cpp/src/Ice/Reference.cpp +37 -26
- data/dist/ice/cpp/src/Ice/Reference.h +3 -0
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +26 -13
- data/dist/ice/cpp/src/Ice/RequestHandler.h +3 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +1 -1
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +1 -1
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +3 -3
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +8 -12
- data/dist/ice/cpp/src/Ice/SHA1.cpp +11 -11
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +0 -6
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +0 -6
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +27 -12
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +1 -2
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +77 -27
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +2 -1
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.cpp +2 -2
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +1 -4
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +39 -34
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +165 -80
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +1 -5
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +73 -33
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +0 -1
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +110 -17
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +7 -2
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +9 -3
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +73 -51
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +0 -8
- data/dist/ice/cpp/src/Ice/Selector.cpp +13 -11
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +3 -3
- data/dist/ice/cpp/src/Ice/Service.cpp +33 -115
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +33 -40
- data/dist/ice/cpp/src/Ice/StreamSocket.h +4 -4
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +1 -1
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +12 -21
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +136 -100
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +7 -3
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +1 -1
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +7 -7
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +2 -1
- data/dist/ice/cpp/src/Ice/TcpBufSize.h +40 -0
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +5 -2
- data/dist/ice/cpp/src/Ice/TcpConnector.h +2 -0
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +2 -2
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +6 -2
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +2 -8
- data/dist/ice/cpp/src/Ice/ThreadPool.h +0 -2
- data/dist/ice/cpp/src/Ice/Timer.cpp +7 -3
- data/dist/ice/cpp/src/Ice/UUID.cpp +1 -2
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +6 -3
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +136 -123
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +3 -4
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +8 -3
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +5 -1
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +45 -2
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +214 -34
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +13 -2
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +4 -2
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +2 -2
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +2 -2
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +47 -9
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +8 -3
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +43 -14
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +2 -2
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +32 -26
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +6 -4
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +3 -11
- data/dist/ice/cpp/src/Slice/FileTracker.h +0 -2
- data/dist/ice/cpp/src/Slice/Grammar.cpp +211 -210
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +34 -14
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +3 -2
- data/dist/ice/cpp/src/Slice/Parser.cpp +145 -97
- data/dist/ice/cpp/src/Slice/Parser.h +22 -8
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +77 -29
- data/dist/ice/cpp/src/Slice/Preprocessor.h +0 -3
- data/dist/ice/cpp/src/Slice/Scanner.cpp +3 -3
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +203 -172
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +0 -2
- data/dist/ice/cpp/src/Slice/Util.h +21 -12
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +7 -3
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +26 -20
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +10 -13
- data/dist/ice/slice/Glacier2/Router.ice +3 -3
- data/dist/ice/slice/Ice/Identity.ice +3 -0
- data/dist/ice/slice/Ice/Locator.ice +6 -5
- data/dist/ice/slice/Ice/LocatorRegistry.ice +3 -0
- data/dist/ice/slice/Ice/Metrics.ice +7 -6
- data/dist/ice/slice/Ice/OperationMode.ice +8 -0
- data/dist/ice/slice/Ice/Process.ice +3 -0
- data/dist/ice/slice/Ice/RemoteLogger.ice +5 -5
- data/dist/ice/slice/Ice/ReplyStatus.ice +13 -0
- data/dist/ice/slice/IceGrid/Admin.ice +9 -9
- data/dist/ice/slice/IceGrid/Descriptor.ice +5 -5
- data/dist/ice/slice/IceStorm/Metrics.ice +1 -1
- data/dist/lib/Glacier2/Metrics.rb +1 -1
- data/dist/lib/Glacier2/PermissionsVerifier.rb +3 -3
- data/dist/lib/Glacier2/Router.rb +9 -9
- data/dist/lib/Glacier2/SSLInfo.rb +1 -1
- data/dist/lib/Glacier2/Session.rb +15 -15
- data/dist/lib/Ice/BuiltinSequences.rb +1 -1
- data/dist/lib/Ice/CompressBatch.rb +1 -2
- data/dist/lib/Ice/Context.rb +1 -1
- data/dist/lib/Ice/EndpointSelectionType.rb +1 -2
- data/dist/lib/Ice/EndpointTypes.rb +1 -1
- data/dist/lib/Ice/Identity.rb +1 -1
- data/dist/lib/Ice/IdentitySpaceship.rb +1 -0
- data/dist/lib/Ice/LocalExceptions.rb +3 -0
- data/dist/lib/Ice/Locator.rb +5 -5
- data/dist/lib/Ice/LocatorRegistry.rb +4 -4
- data/dist/lib/Ice/Metrics.rb +7 -7
- data/dist/lib/Ice/OperationMode.rb +2 -3
- data/dist/lib/Ice/Process.rb +3 -3
- data/dist/lib/Ice/PropertiesAdmin.rb +4 -4
- data/dist/lib/Ice/PropertyDict.rb +1 -1
- data/dist/lib/Ice/ProxyFunctions.rb +8 -4
- data/dist/lib/Ice/RemoteLogger.rb +7 -8
- data/dist/lib/Ice/ReplyStatus.rb +4 -4
- data/dist/lib/Ice/Router.rb +5 -5
- data/dist/lib/Ice/SliceChecksumDict.rb +1 -1
- data/dist/lib/Ice/SliceUtil.rb +2 -2
- data/dist/lib/Ice/Struct.rb +1 -0
- data/dist/lib/Ice/ToStringMode.rb +1 -2
- data/dist/lib/Ice/Value.rb +2 -2
- data/dist/lib/Ice/Version.rb +1 -1
- data/dist/lib/IceBox/ServiceManager.rb +8 -8
- data/dist/lib/IceGrid/Admin.rb +85 -86
- data/dist/lib/IceGrid/Descriptor.rb +1 -1
- data/dist/lib/IceGrid/Exception.rb +1 -1
- data/dist/lib/IceGrid/FileParser.rb +2 -2
- data/dist/lib/IceGrid/Registry.rb +14 -15
- data/dist/lib/IceGrid/Session.rb +7 -7
- data/dist/lib/IceGrid/UserAccountMapper.rb +2 -2
- data/dist/lib/IceStorm/IceStorm.rb +16 -16
- data/dist/lib/IceStorm/Metrics.rb +1 -1
- data/extconf.rb +1 -1
- data/ice.gemspec +3 -3
- metadata +5 -5
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +0 -40
- data/dist/ice/cpp/src/Ice/UndefSysMacros.h +0 -37
|
@@ -38,8 +38,8 @@ IceInternal::isAbsolutePath(const string& path)
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
#ifdef _WIN32
|
|
41
|
-
// We need at least 3 non whitespace
|
|
42
|
-
//
|
|
41
|
+
// We need at least 3 non whitespace characters to have
|
|
42
|
+
// an absolute path
|
|
43
43
|
if (i + 3 > size)
|
|
44
44
|
{
|
|
45
45
|
return false;
|
|
@@ -195,39 +195,11 @@ IceInternal::mkdir(const string& path, int)
|
|
|
195
195
|
return ::_wmkdir(stringToWstring(path, Ice::getProcessStringConverter()).c_str());
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
FILE*
|
|
199
|
-
IceInternal::fopen(const string& path, const string& mode)
|
|
200
|
-
{
|
|
201
|
-
//
|
|
202
|
-
// Don't need to use a wide string converter, the wide strings are directly passed
|
|
203
|
-
// to Windows API.
|
|
204
|
-
//
|
|
205
|
-
const Ice::StringConverterPtr converter = Ice::getProcessStringConverter();
|
|
206
|
-
return ::_wfopen(stringToWstring(path, converter).c_str(), stringToWstring(mode, converter).c_str());
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
int
|
|
210
|
-
IceInternal::open(const string& path, int flags)
|
|
211
|
-
{
|
|
212
|
-
//
|
|
213
|
-
// Don't need to use a wide string converter, the wide string is directly passed
|
|
214
|
-
// to Windows API.
|
|
215
|
-
//
|
|
216
|
-
if (flags & _O_CREAT)
|
|
217
|
-
{
|
|
218
|
-
return ::_wopen(stringToWstring(path, Ice::getProcessStringConverter()).c_str(), flags, _S_IREAD | _S_IWRITE);
|
|
219
|
-
}
|
|
220
|
-
else
|
|
221
|
-
{
|
|
222
|
-
return ::_wopen(stringToWstring(path, Ice::getProcessStringConverter()).c_str(), flags);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
198
|
int
|
|
227
199
|
IceInternal::getcwd(string& cwd)
|
|
228
200
|
{
|
|
229
201
|
//
|
|
230
|
-
// Don't need to use a wide string converter, the wide string
|
|
202
|
+
// Don't need to use a wide string converter, the wide string comes
|
|
231
203
|
// from Windows API.
|
|
232
204
|
//
|
|
233
205
|
wchar_t cwdbuf[_MAX_PATH];
|
|
@@ -249,16 +221,6 @@ IceInternal::unlink(const string& path)
|
|
|
249
221
|
return _wunlink(stringToWstring(path, Ice::getProcessStringConverter()).c_str());
|
|
250
222
|
}
|
|
251
223
|
|
|
252
|
-
int
|
|
253
|
-
IceInternal::close(int fd)
|
|
254
|
-
{
|
|
255
|
-
# ifdef _WIN32
|
|
256
|
-
return _close(fd);
|
|
257
|
-
# else
|
|
258
|
-
return ::close(fd);
|
|
259
|
-
# endif
|
|
260
|
-
}
|
|
261
|
-
|
|
262
224
|
IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
263
225
|
{
|
|
264
226
|
//
|
|
@@ -280,19 +242,19 @@ IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
|
280
242
|
throw FileLockException(__FILE__, __LINE__, GetLastError(), _path);
|
|
281
243
|
}
|
|
282
244
|
|
|
283
|
-
OVERLAPPED
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
245
|
+
OVERLAPPED overlapped;
|
|
246
|
+
overlapped.Internal = 0;
|
|
247
|
+
overlapped.InternalHigh = 0;
|
|
248
|
+
overlapped.Offset = 0;
|
|
249
|
+
overlapped.OffsetHigh = 0;
|
|
288
250
|
|
|
289
251
|
# if defined(_MSC_VER)
|
|
290
|
-
|
|
252
|
+
overlapped.hEvent = nullptr;
|
|
291
253
|
# else
|
|
292
|
-
|
|
254
|
+
overlapped.hEvent = 0;
|
|
293
255
|
# endif
|
|
294
256
|
|
|
295
|
-
if (::LockFileEx(_fd, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, 0, 0, &
|
|
257
|
+
if (::LockFileEx(_fd, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, 0, 0, &overlapped) == 0)
|
|
296
258
|
{
|
|
297
259
|
::CloseHandle(_fd);
|
|
298
260
|
throw FileLockException(__FILE__, __LINE__, GetLastError(), _path);
|
|
@@ -351,26 +313,6 @@ IceInternal::mkdir(const string& path, int perm)
|
|
|
351
313
|
return ::mkdir(path.c_str(), static_cast<mode_t>(perm));
|
|
352
314
|
}
|
|
353
315
|
|
|
354
|
-
FILE*
|
|
355
|
-
IceInternal::fopen(const string& path, const string& mode)
|
|
356
|
-
{
|
|
357
|
-
return ::fopen(path.c_str(), mode.c_str());
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
int
|
|
361
|
-
IceInternal::open(const string& path, int flags)
|
|
362
|
-
{
|
|
363
|
-
if (flags & O_CREAT)
|
|
364
|
-
{
|
|
365
|
-
// By default, create with rw-rw-rw- modified by the user's umask (same as fopen).
|
|
366
|
-
return ::open(path.c_str(), flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
|
367
|
-
}
|
|
368
|
-
else
|
|
369
|
-
{
|
|
370
|
-
return ::open(path.c_str(), flags);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
316
|
int
|
|
375
317
|
IceInternal::getcwd(string& cwd)
|
|
376
318
|
{
|
|
@@ -389,15 +331,9 @@ IceInternal::unlink(const string& path)
|
|
|
389
331
|
return ::unlink(path.c_str());
|
|
390
332
|
}
|
|
391
333
|
|
|
392
|
-
int
|
|
393
|
-
IceInternal::close(int fd)
|
|
394
|
-
{
|
|
395
|
-
return ::close(fd);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
334
|
IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
399
335
|
{
|
|
400
|
-
_fd = ::open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR
|
|
336
|
+
_fd = ::open(path.c_str(), O_RDWR | O_CREAT | O_NOFOLLOW, S_IRUSR | S_IWUSR);
|
|
401
337
|
if (_fd < 0)
|
|
402
338
|
{
|
|
403
339
|
throw FileLockException(__FILE__, __LINE__, errno, _path);
|
|
@@ -417,7 +353,7 @@ IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
|
417
353
|
if (::fcntl(_fd, F_SETLK, &lock) == -1)
|
|
418
354
|
{
|
|
419
355
|
int err = errno;
|
|
420
|
-
close(_fd);
|
|
356
|
+
::close(_fd);
|
|
421
357
|
throw FileLockException(__FILE__, __LINE__, err, _path);
|
|
422
358
|
}
|
|
423
359
|
|
|
@@ -427,7 +363,7 @@ IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
|
427
363
|
//
|
|
428
364
|
|
|
429
365
|
//
|
|
430
|
-
// Now that we have
|
|
366
|
+
// Now that we have acquired an exclusive write lock,
|
|
431
367
|
// write the process pid there.
|
|
432
368
|
//
|
|
433
369
|
ostringstream os;
|
|
@@ -436,7 +372,7 @@ IceInternal::FileLock::FileLock(const std::string& path) : _path(path)
|
|
|
436
372
|
if (write(_fd, os.str().c_str(), os.str().size()) == -1)
|
|
437
373
|
{
|
|
438
374
|
int err = errno;
|
|
439
|
-
close(_fd);
|
|
375
|
+
::close(_fd);
|
|
440
376
|
throw FileLockException(__FILE__, __LINE__, err, _path);
|
|
441
377
|
}
|
|
442
378
|
}
|
|
@@ -84,13 +84,10 @@ namespace IceInternal
|
|
|
84
84
|
ICE_API int rmdir(const std::string&);
|
|
85
85
|
|
|
86
86
|
ICE_API int mkdir(const std::string&, int);
|
|
87
|
-
ICE_API FILE* fopen(const std::string&, const std::string&);
|
|
88
87
|
ICE_API FILE* freopen(const std::string&, const std::string&, FILE*);
|
|
89
|
-
ICE_API int open(const std::string&, int);
|
|
90
88
|
ICE_API int getcwd(std::string&);
|
|
91
89
|
|
|
92
90
|
ICE_API int unlink(const std::string&);
|
|
93
|
-
ICE_API int close(int);
|
|
94
91
|
|
|
95
92
|
//
|
|
96
93
|
// This class is used to implement process file locking. This class
|
|
@@ -18,7 +18,7 @@ namespace IceInternal
|
|
|
18
18
|
|
|
19
19
|
void asyncRequestCanceled(const OutgoingAsyncBasePtr&, std::exception_ptr) final;
|
|
20
20
|
|
|
21
|
-
Ice::ConnectionIPtr getConnection() final;
|
|
21
|
+
Ice::ConnectionIPtr getConnection() noexcept final;
|
|
22
22
|
|
|
23
23
|
private:
|
|
24
24
|
Ice::ConnectionIPtr _connection;
|
|
@@ -419,6 +419,10 @@ IceInternal::IPEndpointI::IPEndpointI(ProtocolInstancePtr instance, InputStream*
|
|
|
419
419
|
s->read(const_cast<string&>(_host), false);
|
|
420
420
|
const_cast<string&>(_normalizedHost) = normalizeIPv6Address(_host);
|
|
421
421
|
s->read(const_cast<int32_t&>(_port));
|
|
422
|
+
if (_port < 0 || _port > 65535)
|
|
423
|
+
{
|
|
424
|
+
throw MarshalException{__FILE__, __LINE__, "port value '" + to_string(_port) + "' is out of range"};
|
|
425
|
+
}
|
|
422
426
|
}
|
|
423
427
|
|
|
424
428
|
IceInternal::EndpointHostResolver::EndpointHostResolver(const InstancePtr& instance)
|
|
@@ -70,15 +70,18 @@ IdleTimeoutTransceiverDecorator::initialize(Buffer& readBuffer, Buffer& writeBuf
|
|
|
70
70
|
|
|
71
71
|
IdleTimeoutTransceiverDecorator::~IdleTimeoutTransceiverDecorator()
|
|
72
72
|
{
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
// _heartbeatTimerTask remains null when the connection creation fails before decoratorInit is called.
|
|
74
|
+
if (_heartbeatTimerTask)
|
|
75
|
+
{
|
|
76
|
+
_timer->cancel(_heartbeatTimerTask);
|
|
77
|
+
}
|
|
76
78
|
disableIdleCheck();
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
void
|
|
80
82
|
IdleTimeoutTransceiverDecorator::close()
|
|
81
83
|
{
|
|
84
|
+
assert(_heartbeatTimerTask); // close is only called on a connection that completed decoratorInit.
|
|
82
85
|
_timer->cancel(_heartbeatTimerTask);
|
|
83
86
|
disableIdleCheck();
|
|
84
87
|
_decoratee->close();
|
|
@@ -33,14 +33,12 @@ IncomingRequest::IncomingRequest(
|
|
|
33
33
|
{
|
|
34
34
|
throw MarshalException{__FILE__, __LINE__, "received facet path with more than one element"};
|
|
35
35
|
}
|
|
36
|
-
_current.facet = facetPath[0];
|
|
36
|
+
_current.facet = std::move(facetPath[0]);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
inputStream.read(_current.operation, false);
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
inputStream.read(mode);
|
|
43
|
-
_current.mode = static_cast<OperationMode>(mode);
|
|
41
|
+
inputStream.read(_current.mode);
|
|
44
42
|
|
|
45
43
|
int32_t sz = inputStream.readSize();
|
|
46
44
|
while (sz--)
|
|
@@ -243,7 +243,8 @@ Ice::InputStream::startEncapsulation()
|
|
|
243
243
|
{
|
|
244
244
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
// sz includes the 4 bytes of the size itself, which we've already read.
|
|
247
|
+
if (sz - 4 > b.end() - i)
|
|
247
248
|
{
|
|
248
249
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
249
250
|
}
|
|
@@ -305,7 +306,8 @@ Ice::InputStream::skipEmptyEncapsulation()
|
|
|
305
306
|
{
|
|
306
307
|
throw MarshalException{__FILE__, __LINE__, to_string(sz) + " is not a valid encapsulation size"};
|
|
307
308
|
}
|
|
308
|
-
|
|
309
|
+
// sz includes the 4 bytes of the size itself, which we've already read.
|
|
310
|
+
if (sz - 4 > b.end() - i)
|
|
309
311
|
{
|
|
310
312
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
311
313
|
}
|
|
@@ -342,7 +344,8 @@ Ice::InputStream::readEncapsulation(const std::byte*& v, std::int32_t& sz)
|
|
|
342
344
|
{
|
|
343
345
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
344
346
|
}
|
|
345
|
-
|
|
347
|
+
// sz includes the 4 bytes of the size itself, which we've already read.
|
|
348
|
+
if (sz - 4 > b.end() - i)
|
|
346
349
|
{
|
|
347
350
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
348
351
|
}
|
|
@@ -368,7 +371,8 @@ Ice::InputStream::skipEncapsulation()
|
|
|
368
371
|
{
|
|
369
372
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
370
373
|
}
|
|
371
|
-
|
|
374
|
+
// sz includes the 4 bytes of the size itself, which we've already read.
|
|
375
|
+
if (sz - 4 > b.end() - i)
|
|
372
376
|
{
|
|
373
377
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
374
378
|
}
|
|
@@ -428,26 +432,33 @@ Ice::InputStream::readAndCheckSeqSize(int minSize)
|
|
|
428
432
|
// the estimated remaining buffer size. This estimation is based on
|
|
429
433
|
// the minimum size of the enclosing sequences, it's _minSeqSize.
|
|
430
434
|
//
|
|
431
|
-
|
|
435
|
+
// 'sz' is peer-controlled (up to INT32_MAX), so we compute the minimum size of this sequence in
|
|
436
|
+
// 64-bit: 'sz * minSize' would otherwise overflow a 32-bit int and bypass the bounds check below.
|
|
437
|
+
int64_t minSeqSize = static_cast<int64_t>(sz) * minSize;
|
|
438
|
+
|
|
439
|
+
// '_startSeq + _minSeqSize' does not overflow: on the previous call, the bounds check below
|
|
440
|
+
// established this sum is <= b.size(), itself smaller than INT32_MAX.
|
|
441
|
+
if (_startSeq == -1 || (i - b.begin()) > _startSeq + _minSeqSize)
|
|
432
442
|
{
|
|
433
443
|
_startSeq = static_cast<int>(i - b.begin());
|
|
434
|
-
_minSeqSize = sz * minSize;
|
|
435
444
|
}
|
|
436
445
|
else
|
|
437
446
|
{
|
|
438
|
-
|
|
447
|
+
minSeqSize += _minSeqSize;
|
|
439
448
|
}
|
|
440
449
|
|
|
441
450
|
//
|
|
442
451
|
// If there isn't enough data to read on the stream for the sequence (and
|
|
443
452
|
// possibly enclosed sequences), something is wrong with the marshaled
|
|
444
|
-
// data: it's claiming
|
|
453
|
+
// data: it's claiming to have more data than what is possible to read.
|
|
445
454
|
//
|
|
446
|
-
if (_startSeq +
|
|
455
|
+
if (_startSeq + minSeqSize > static_cast<int64_t>(b.size()))
|
|
447
456
|
{
|
|
448
457
|
throwUnmarshalOutOfBoundsException(__FILE__, __LINE__);
|
|
449
458
|
}
|
|
450
459
|
|
|
460
|
+
// minSeqSize is now known to be <= b.size(), itself smaller than INT32_MAX.
|
|
461
|
+
_minSeqSize = static_cast<int>(minSeqSize);
|
|
451
462
|
return sz;
|
|
452
463
|
}
|
|
453
464
|
|
|
@@ -474,15 +485,7 @@ Ice::InputStream::read(std::vector<byte>& v)
|
|
|
474
485
|
{
|
|
475
486
|
std::pair<const byte*, const byte*> p;
|
|
476
487
|
read(p);
|
|
477
|
-
|
|
478
|
-
{
|
|
479
|
-
v.resize(static_cast<size_t>(p.second - p.first));
|
|
480
|
-
copy(p.first, p.second, v.begin());
|
|
481
|
-
}
|
|
482
|
-
else
|
|
483
|
-
{
|
|
484
|
-
v.clear();
|
|
485
|
-
}
|
|
488
|
+
v.assign(p.first, p.second);
|
|
486
489
|
}
|
|
487
490
|
|
|
488
491
|
void
|
|
@@ -599,7 +602,7 @@ Ice::InputStream::read(vector<int16_t>& v)
|
|
|
599
602
|
if constexpr (endian::native == endian::big)
|
|
600
603
|
{
|
|
601
604
|
const byte* src = &(*begin);
|
|
602
|
-
byte* dest = reinterpret_cast<byte*>(
|
|
605
|
+
byte* dest = reinterpret_cast<byte*>(v.data()) + sizeof(int16_t) - 1;
|
|
603
606
|
for (int j = 0; j < sz; ++j)
|
|
604
607
|
{
|
|
605
608
|
*dest-- = *src++;
|
|
@@ -609,7 +612,7 @@ Ice::InputStream::read(vector<int16_t>& v)
|
|
|
609
612
|
}
|
|
610
613
|
else
|
|
611
614
|
{
|
|
612
|
-
copy(begin, i, reinterpret_cast<byte*>(
|
|
615
|
+
copy(begin, i, reinterpret_cast<byte*>(v.data()));
|
|
613
616
|
}
|
|
614
617
|
}
|
|
615
618
|
else
|
|
@@ -657,7 +660,7 @@ Ice::InputStream::read(vector<int32_t>& v)
|
|
|
657
660
|
if constexpr (endian::native == endian::big)
|
|
658
661
|
{
|
|
659
662
|
const byte* src = &(*begin);
|
|
660
|
-
byte* dest = reinterpret_cast<byte*>(
|
|
663
|
+
byte* dest = reinterpret_cast<byte*>(v.data()) + sizeof(int32_t) - 1;
|
|
661
664
|
for (int j = 0; j < sz; ++j)
|
|
662
665
|
{
|
|
663
666
|
*dest-- = *src++;
|
|
@@ -669,7 +672,7 @@ Ice::InputStream::read(vector<int32_t>& v)
|
|
|
669
672
|
}
|
|
670
673
|
else
|
|
671
674
|
{
|
|
672
|
-
copy(begin, i, reinterpret_cast<byte*>(
|
|
675
|
+
copy(begin, i, reinterpret_cast<byte*>(v.data()));
|
|
673
676
|
}
|
|
674
677
|
}
|
|
675
678
|
else
|
|
@@ -725,7 +728,7 @@ Ice::InputStream::read(vector<int64_t>& v)
|
|
|
725
728
|
if constexpr (endian::native == endian::big)
|
|
726
729
|
{
|
|
727
730
|
const byte* src = &(*begin);
|
|
728
|
-
byte* dest = reinterpret_cast<byte*>(
|
|
731
|
+
byte* dest = reinterpret_cast<byte*>(v.data()) + sizeof(int64_t) - 1;
|
|
729
732
|
for (int j = 0; j < sz; ++j)
|
|
730
733
|
{
|
|
731
734
|
*dest-- = *src++;
|
|
@@ -741,7 +744,7 @@ Ice::InputStream::read(vector<int64_t>& v)
|
|
|
741
744
|
}
|
|
742
745
|
else
|
|
743
746
|
{
|
|
744
|
-
copy(begin, i, reinterpret_cast<byte*>(
|
|
747
|
+
copy(begin, i, reinterpret_cast<byte*>(v.data()));
|
|
745
748
|
}
|
|
746
749
|
}
|
|
747
750
|
else
|
|
@@ -789,7 +792,7 @@ Ice::InputStream::read(vector<float>& v)
|
|
|
789
792
|
if constexpr (endian::native == endian::big)
|
|
790
793
|
{
|
|
791
794
|
const byte* src = &(*begin);
|
|
792
|
-
byte* dest = reinterpret_cast<byte*>(
|
|
795
|
+
byte* dest = reinterpret_cast<byte*>(v.data()) + sizeof(float) - 1;
|
|
793
796
|
for (int j = 0; j < sz; ++j)
|
|
794
797
|
{
|
|
795
798
|
*dest-- = *src++;
|
|
@@ -801,7 +804,7 @@ Ice::InputStream::read(vector<float>& v)
|
|
|
801
804
|
}
|
|
802
805
|
else
|
|
803
806
|
{
|
|
804
|
-
copy(begin, i, reinterpret_cast<byte*>(
|
|
807
|
+
copy(begin, i, reinterpret_cast<byte*>(v.data()));
|
|
805
808
|
}
|
|
806
809
|
}
|
|
807
810
|
else
|
|
@@ -857,7 +860,7 @@ Ice::InputStream::read(vector<double>& v)
|
|
|
857
860
|
if constexpr (endian::native == endian::big)
|
|
858
861
|
{
|
|
859
862
|
const byte* src = &(*begin);
|
|
860
|
-
byte* dest = reinterpret_cast<byte*>(
|
|
863
|
+
byte* dest = reinterpret_cast<byte*>(v.data()) + sizeof(double) - 1;
|
|
861
864
|
for (int j = 0; j < sz; ++j)
|
|
862
865
|
{
|
|
863
866
|
*dest-- = *src++;
|
|
@@ -873,7 +876,7 @@ Ice::InputStream::read(vector<double>& v)
|
|
|
873
876
|
}
|
|
874
877
|
else
|
|
875
878
|
{
|
|
876
|
-
copy(begin, i, reinterpret_cast<byte*>(
|
|
879
|
+
copy(begin, i, reinterpret_cast<byte*>(v.data()));
|
|
877
880
|
}
|
|
878
881
|
}
|
|
879
882
|
else
|
|
@@ -1142,6 +1145,13 @@ Ice::InputStream::readOptImpl(int32_t readTag, OptionalFormat expectedFormat)
|
|
|
1142
1145
|
|
|
1143
1146
|
auto format = static_cast<OptionalFormat>(v & 0x07); // First 3 bits.
|
|
1144
1147
|
auto tag = static_cast<int32_t>(v >> 3);
|
|
1148
|
+
if (tag > 30)
|
|
1149
|
+
{
|
|
1150
|
+
// We check for '> 30' instead of '> 29' because 30 is a special sentinel tag, handled by the next block.
|
|
1151
|
+
ostringstream os;
|
|
1152
|
+
os << "invalid tag '" << tag << "': tags larger than 29 must be encoded as a size";
|
|
1153
|
+
throw MarshalException(__FILE__, __LINE__, os.str());
|
|
1154
|
+
}
|
|
1145
1155
|
if (tag == 30)
|
|
1146
1156
|
{
|
|
1147
1157
|
tag = readSize();
|
|
@@ -1454,7 +1464,7 @@ Ice::InputStream::EncapsDecoder10::read(PatchFunc patchFunc, void* patchAddr)
|
|
|
1454
1464
|
//
|
|
1455
1465
|
int32_t index;
|
|
1456
1466
|
_stream->read(index);
|
|
1457
|
-
if (index > 0)
|
|
1467
|
+
if (index > 0 || index == INT32_MIN)
|
|
1458
1468
|
{
|
|
1459
1469
|
throw MarshalException(__FILE__, __LINE__, "invalid object id");
|
|
1460
1470
|
}
|
|
@@ -1480,7 +1490,7 @@ Ice::InputStream::EncapsDecoder10::throwException(UserExceptionFactory exception
|
|
|
1480
1490
|
assert(_sliceType == NoSlice);
|
|
1481
1491
|
|
|
1482
1492
|
//
|
|
1483
|
-
// User
|
|
1493
|
+
// User exceptions with the 1.0 encoding start with a boolean flag
|
|
1484
1494
|
// that indicates whether or not the exception has classes.
|
|
1485
1495
|
//
|
|
1486
1496
|
// This allows reading the pending values even if some part of
|
|
@@ -1916,7 +1926,11 @@ Ice::InputStream::EncapsDecoder11::startSlice()
|
|
|
1916
1926
|
if (_current->sliceFlags & FLAG_HAS_SLICE_SIZE)
|
|
1917
1927
|
{
|
|
1918
1928
|
_stream->read(_current->sliceSize);
|
|
1919
|
-
|
|
1929
|
+
// A slice with optional members carries at least the 1-byte end marker in its body, so its
|
|
1930
|
+
// size (which includes the 4-byte size field) must be >= 5. We rely on this in skipSlice's
|
|
1931
|
+
// slice-preservation logic, which excludes the end marker by stepping back one byte.
|
|
1932
|
+
int32_t minSliceSize = (_current->sliceFlags & FLAG_HAS_OPTIONAL_MEMBERS) ? 5 : 4;
|
|
1933
|
+
if (_current->sliceSize < minSliceSize)
|
|
1920
1934
|
{
|
|
1921
1935
|
throw MarshalException{__FILE__, __LINE__, endOfBufferMessage};
|
|
1922
1936
|
}
|
|
@@ -2074,7 +2088,10 @@ Ice::InputStream::EncapsDecoder11::readOptional(int32_t readTag, Ice::OptionalFo
|
|
|
2074
2088
|
int32_t
|
|
2075
2089
|
Ice::InputStream::EncapsDecoder11::readInstance(int32_t index, const PatchFunc& patchFunc, void* patchAddr)
|
|
2076
2090
|
{
|
|
2077
|
-
|
|
2091
|
+
if (index <= 0)
|
|
2092
|
+
{
|
|
2093
|
+
throw MarshalException(__FILE__, __LINE__, "invalid class instance index");
|
|
2094
|
+
}
|
|
2078
2095
|
|
|
2079
2096
|
if (index > 1)
|
|
2080
2097
|
{
|
|
@@ -2089,7 +2106,7 @@ Ice::InputStream::EncapsDecoder11::readInstance(int32_t index, const PatchFunc&
|
|
|
2089
2106
|
|
|
2090
2107
|
//
|
|
2091
2108
|
// Get the object ID before we start reading slices. If some
|
|
2092
|
-
// slices are
|
|
2109
|
+
// slices are skipped, the indirect object table is still read and
|
|
2093
2110
|
// might read other instances.
|
|
2094
2111
|
//
|
|
2095
2112
|
index = ++_valueIdIndex;
|