aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBCodedInputStream.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2015-11-23 12:23:27 -0500
committerThomas Van Lenten <thomasvl@google.com>2015-11-23 12:23:27 -0500
commitba800e2e57baf6ed9525dba1c48d21c1a79fafb5 (patch)
tree08bfcfb7687cfe4fa903ce884f5d184fe0b1451e /objectivec/GPBCodedInputStream.m
parent4e3388168df413133e0e97791cc131f8131f478c (diff)
downloadprotobuf-ba800e2e57baf6ed9525dba1c48d21c1a79fafb5.tar.gz
protobuf-ba800e2e57baf6ed9525dba1c48d21c1a79fafb5.tar.bz2
protobuf-ba800e2e57baf6ed9525dba1c48d21c1a79fafb5.zip
Set the stream limit to the length of the data.
- Mark all conformance tests as now passing.
Diffstat (limited to 'objectivec/GPBCodedInputStream.m')
-rw-r--r--objectivec/GPBCodedInputStream.m6
1 files changed, 1 insertions, 5 deletions
diff --git a/objectivec/GPBCodedInputStream.m b/objectivec/GPBCodedInputStream.m
index 71758baa..9371228a 100644
--- a/objectivec/GPBCodedInputStream.m
+++ b/objectivec/GPBCodedInputStream.m
@@ -264,10 +264,6 @@ void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state,
}
size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state) {
- if (state->currentLimit == SIZE_T_MAX) {
- return state->currentLimit;
- }
-
return state->currentLimit - state->bufferPos;
}
@@ -299,7 +295,7 @@ void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state,
buffer_ = [data retain];
state_.bytes = (const uint8_t *)[data bytes];
state_.bufferSize = [data length];
- state_.currentLimit = NSUIntegerMax;
+ state_.currentLimit = state_.bufferSize;
}
return self;
}