C# (CSharp) Google.ProtocolBuffers CodedInputStream.SetSizeLimit - 6 Beispiele gefunden. Dies sind die am besten bewerteten C# (CSharp) Beispiele für die Google.ProtocolBuffers.CodedInputStream.SetSizeLimit, die aus Open Source-Projekten extrahiert wurden. Sie können Beispiele bewerten, um die Qualität der Beispiele zu verbessern.
In order to prevent malicious messages from exhausting memory or causing integer overflows, CodedInputStream limits how large a message may be. The default limit is 64MB. You should set this limit as small as you can without harming your app's functionality. Note that size limits only apply when reading from an InputStream, not when constructed around a raw byte array (nor with ByteString.NewCodedInput). If you want to read several messages from a single CodedInputStream, you can call ResetSizeCounter() after each message to avoid hitting the size limit.