Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
6c69373f
Commit
6c69373f
authored
Jun 11, 2011
by
csharptest
Committed by
rogerk
Jun 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bla, changed name to Depth for CLSComplaint :)
parent
3b70dd78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
AbstractReader.cs
src/ProtocolBuffers/Serialization/AbstractReader.cs
+9
-9
XmlFormatReader.cs
src/ProtocolBuffers/Serialization/XmlFormatReader.cs
+1
-1
No files found.
src/ProtocolBuffers/Serialization/AbstractReader.cs
View file @
6c69373f
...
...
@@ -13,7 +13,7 @@ namespace Google.ProtocolBuffers.Serialization
public
abstract
class
AbstractReader
:
ICodedInputStream
{
const
int
MaxDepth
=
CodedInputStream
.
DefaultRecursionLimit
;
protected
int
_d
epth
;
protected
int
D
epth
;
/// <summary>
/// Merges the contents of stream into the provided message builder
...
...
@@ -334,10 +334,10 @@ namespace Google.ProtocolBuffers.Serialization
void
ICodedInputStream
.
ReadGroup
(
int
fieldNumber
,
IBuilderLite
builder
,
ExtensionRegistry
extensionRegistry
)
{
if
(
_d
epth
++
>
MaxDepth
)
if
(
D
epth
++
>
MaxDepth
)
throw
InvalidProtocolBufferException
.
RecursionLimitExceeded
();
ReadGroup
(
builder
,
extensionRegistry
);
_d
epth
--;
D
epth
--;
}
void
ICodedInputStream
.
ReadUnknownGroup
(
int
fieldNumber
,
IBuilderLite
builder
)
...
...
@@ -345,10 +345,10 @@ namespace Google.ProtocolBuffers.Serialization
void
ICodedInputStream
.
ReadMessage
(
IBuilderLite
builder
,
ExtensionRegistry
extensionRegistry
)
{
if
(
_d
epth
++
>
MaxDepth
)
if
(
D
epth
++
>
MaxDepth
)
throw
InvalidProtocolBufferException
.
RecursionLimitExceeded
();
ReadMessage
(
builder
,
extensionRegistry
);
_d
epth
--;
D
epth
--;
}
bool
ICodedInputStream
.
ReadBytes
(
ref
ByteString
value
)
...
...
@@ -453,18 +453,18 @@ namespace Google.ProtocolBuffers.Serialization
void
ICodedInputStream
.
ReadMessageArray
<
T
>(
uint
fieldTag
,
string
fieldName
,
ICollection
<
T
>
list
,
T
messageType
,
ExtensionRegistry
registry
)
{
if
(
_d
epth
++
>
MaxDepth
)
if
(
D
epth
++
>
MaxDepth
)
throw
InvalidProtocolBufferException
.
RecursionLimitExceeded
();
ReadMessageArray
(
fieldName
,
list
,
messageType
,
registry
);
_d
epth
--;
D
epth
--;
}
void
ICodedInputStream
.
ReadGroupArray
<
T
>(
uint
fieldTag
,
string
fieldName
,
ICollection
<
T
>
list
,
T
messageType
,
ExtensionRegistry
registry
)
{
if
(
_d
epth
++
>
MaxDepth
)
if
(
D
epth
++
>
MaxDepth
)
throw
InvalidProtocolBufferException
.
RecursionLimitExceeded
();
ReadGroupArray
(
fieldName
,
list
,
messageType
,
registry
);
_d
epth
--;
D
epth
--;
}
bool
ICodedInputStream
.
ReadPrimitiveField
(
FieldType
fieldType
,
ref
object
value
)
...
...
src/ProtocolBuffers/Serialization/XmlFormatReader.cs
View file @
6c69373f
...
...
@@ -74,7 +74,7 @@ namespace Google.ProtocolBuffers.Serialization
{
XmlFormatReader
copy
=
new
XmlFormatReader
(
rdr
).
SetOptions
(
Options
);
copy
.
_rootElementName
=
_rootElementName
;
copy
.
_depth
=
_d
epth
;
copy
.
Depth
=
D
epth
;
return
copy
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment